Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Remove native extension gems and use wrapper gem #275

Merged
merged 4 commits into from
Sep 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ rvm:
- 2.2.5
- 2.1.10
env:
- secure: n0mxwnyjuXI4mJO4mp++2TnsPJ+XgCF/J1U2L5piE5j3xMhSU+5V0JrA1uFlS0Pemb44M7BjgmF9S4G35BwyAQpctpCYhqy9tFa6+Y6nxEv5hCv2cZz7BSAZM6eb+zq20409hxTHRaQOr1DBeE4R5S2PrmOXRqvYfTRv3LNSLFk=
global:
- secure: n0mxwnyjuXI4mJO4mp++2TnsPJ+XgCF/J1U2L5piE5j3xMhSU+5V0JrA1uFlS0Pemb44M7BjgmF9S4G35BwyAQpctpCYhqy9tFa6+Y6nxEv5hCv2cZz7BSAZM6eb+zq20409hxTHRaQOr1DBeE4R5S2PrmOXRqvYfTRv3LNSLFk=
matrix:
- OJ=0
- OJ=1
before_script:
- if [[ $OJ -eq 1 ]]; then gem install oj; fi
notifications:
slack:
secure: iTI8zpxXQJqf5e9ix4buLRsGlf9lJRZqA9Fawdqm41msBrC0Zsp31XzBS7ZPiTcdHhImtOC4lccTCW2C8kR6waaG5VOF0U2BwyKaNFKsXMaVk6yrNhYkvJ9YVicuU9hL+JKLyBrSDYQ7+vXcHqaz4H4dYpPThrv6sfq4jBOp+eM=
12 changes: 1 addition & 11 deletions lib/terraforming.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
require "oj"

begin
require "ox"
rescue NameError => e
spec = Gem::Specification.stubs.find { |s| s.name == 'ox' }
raise e unless spec
require File.join(spec.gem_dir, "lib/ox")
end

require "aws-sdk-core"
require "erb"
require "json"
require "multi_json"
require "thor"
require "zlib"

Expand Down
4 changes: 2 additions & 2 deletions lib/terraforming/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ def tf(klass)
end

def tfstate(klass, tfstate_path)
tfstate = tfstate_path ? JSON.parse(open(tfstate_path).read) : tfstate_skeleton
tfstate = tfstate_path ? MultiJson.load(open(tfstate_path).read) : tfstate_skeleton
tfstate["serial"] = tfstate["serial"] + 1
tfstate["modules"][0]["resources"] = tfstate["modules"][0]["resources"].merge(klass.tfstate)
JSON.pretty_generate(tfstate)
MultiJson.encode(tfstate, pretty: true)
end

def tfstate_skeleton
Expand Down
3 changes: 1 addition & 2 deletions terraforming.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "aws-sdk", "~> 2.6.1"
spec.add_dependency "oj", "~> 2.17.1"
spec.add_dependency "ox", "~> 2.4.0"
spec.add_dependency "multi_json", "~> 1.12.1"
spec.add_dependency "thor"

spec.add_development_dependency "bundler", "~> 1.7"
Expand Down