lacerda 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f3515827ac0e0906718373949fd7f8b9435da1a
4
- data.tar.gz: 27db4d757a2a9f77ecc55b24297ca7a53535213b
3
+ metadata.gz: 322ae1cf280fd1575b67fb9423525245e657b987
4
+ data.tar.gz: ab9416b4d1a10d2bef1187ae58b9284f753ecde0
5
5
  SHA512:
6
- metadata.gz: c2ad189d09cbb074fb2245aefb4359dc96cf41354ffbdc8dd1cfc1fc05bd14e335a739514b2840285243281d99ab4b7763fb27cbbcbf2b4abc91cf911968fefe
7
- data.tar.gz: 9b2ade73de003c6121bdcabd742b17c5e9f246ce99a9ed642330bf5654c193a847f379fbc7fc2bc234034a6b378c267ad4ab90e7048bc14f27328a727d6c94e4
6
+ metadata.gz: 93c385fe049be72afa341b67ce03b41dea4fb7cc128b0f25827227b4ca56a8927ffa2c054ebd152016e3da10ef485b2aabcfc13074ab9b44320f0a0bae42ddd7
7
+ data.tar.gz: ddb0ae87136af9aa1e12e444927474cfede888b9866c9e6eb85bbb4dc007e5d957f08cc3abde2497e1c8cef908f7653ce8970fa482962ce0449739440c65f61b
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.6.1 (30-Oct-15)
2
+ - fix some forgotten ruby 2.0 syntax
3
+
1
4
  # 0.6.0 (30-Oct-15)
2
5
  - bump Blumquist version to the one that auto validates
3
6
  - be ruby <2 compatible
data/circle.yml ADDED
@@ -0,0 +1,3 @@
1
+ achine:
2
+ ruby:
3
+ version: 1.9
@@ -3,21 +3,27 @@ require 'open3'
3
3
  require 'lacerda/conversion/apiary_to_json_schema'
4
4
  require 'lacerda/conversion/error'
5
5
  require 'redsnow'
6
+ require 'colorize'
6
7
 
7
8
  module Lacerda
8
9
  module Conversion
9
- def self.mson_to_json_schema(filename:, keep_intermediary_files: false, verbose: false)
10
+ def self.mson_to_json_schema(options)
11
+ filename = options.fetch(:filename)
10
12
  begin
11
- mson_to_json_schema!(filename: filename, keep_intermediary_files: keep_intermediary_files, verbose: verbose)
12
- puts "OK ".green + filename if verbose
13
+ mson_to_json_schema!(
14
+ filename: filename,
15
+ keep_intermediary_files: options.fetch(:keep_intermediary_files, false)
16
+ )
17
+ puts "OK ".green + filename if options.fetch(:verbose, true)
13
18
  true
14
19
  rescue
15
- puts "ERROR ".red + filename if verbose
20
+ puts "ERROR ".red + filename if options.fetch(:verbose, true)
16
21
  false
17
22
  end
18
23
  end
19
24
 
20
- def self.mson_to_json_schema!(filename:, keep_intermediary_files: false, verbose: true)
25
+ def self.mson_to_json_schema!(options)
26
+ filename = options.fetch(:filename)
21
27
 
22
28
  # For now, we'll use the containing directory's name as a scope
23
29
  service_scope = File.dirname(filename).split(File::SEPARATOR).last.underscore
@@ -95,7 +101,7 @@ module Lacerda
95
101
  File.open(outfile, 'w'){ |f| f.puts JSON.pretty_generate(schema) }
96
102
 
97
103
  # Clean up
98
- FileUtils.rm_f(ast_file) unless keep_intermediary_files
104
+ FileUtils.rm_f(ast_file) unless options.fetch(:keep_intermediary_files, false)
99
105
  true
100
106
  end
101
107
 
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacerda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
@@ -209,6 +209,7 @@ files:
209
209
  - Guardfile
210
210
  - README.md
211
211
  - Rakefile
212
+ - circle.yml
212
213
  - lacerda.gemspec
213
214
  - lib/lacerda.rb
214
215
  - lib/lacerda/compare/json_schema.rb