zapata 0.1.1 → 0.1.2

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: 6da96af6557de7e2ae7108f95a5349e20efa252d
4
- data.tar.gz: fb7405ceed05f74fa640448b6cdbb2012f765de5
3
+ metadata.gz: 73c3dbe2d44793d627bc3c39f0bceb5387f03ba7
4
+ data.tar.gz: c9d8e646b39927760c1678948bf61de29cab9c3c
5
5
  SHA512:
6
- metadata.gz: 989989ef785e7b0be21b4860843991fe18160aceeba46a8391c1d88f0a5a11d7e81b9f7d4c87899566db8e200f2a7f7f9063a8d0dc5560ff74a73e3423e24555
7
- data.tar.gz: c29d746fb1f0b03d9b8ced1b729532f3065cbbabe9dd2848ef2654549c4e86ea98d59ea16ec64e75926d1cc67a0c9ba6fc0f0ff51d610d3dfe929a7f41adfe1b
6
+ metadata.gz: fff55f9eb5de87ec1285cde3a72a28ca6c05d7adbceb292114ba14903eef4563f8efaeed5474a8e61657d26dab78a78b18068f9c4b520a04aeca8b7d65f6ab3b
7
+ data.tar.gz: 6d18d84d660fc529cfdad2fdfec69d6232801471d47dcdadd4bd832dedbda30683125a54c94042b2af65a9898ccfaef60e52250261ff5c70a36906bda6285397
data/.travis.yml CHANGED
@@ -17,3 +17,7 @@ matrix:
17
17
  - rvm: ruby-head
18
18
  - rvm: jruby-head
19
19
  - rvm: rbx
20
+
21
+ branches:
22
+ only:
23
+ - master
data/README.md CHANGED
@@ -137,6 +137,8 @@ Write more code and when you're happy with the result - lock it up again.
137
137
  - Ruby 2.0+
138
138
  - Rails 3.0+
139
139
 
140
+ Ruby 1.9.3 and older version support is in next release and can be checked out [here](https://github.com/Nedomas/zapata/issues/2).
141
+
140
142
  ## Installation
141
143
 
142
144
  It should be as easy as
data/bin/zapata CHANGED
@@ -17,8 +17,13 @@ slop = Slop.new(help: true, banner: true) do
17
17
  on(:s, :single, "Does not analyze 'app/models'", banner: true)
18
18
 
19
19
  run do |opts, args|
20
- spec_filename = Zapata::Revolutionist.generate(args.shift, single: opts.single?)
21
- puts "Its done, comrades. File #{spec_filename} was generated."
20
+ Zapata::Revolutionist.generate_with_friendly_output(args.shift, opts)
21
+ end
22
+ end
23
+
24
+ run do |opts, args|
25
+ if args.present?
26
+ Zapata::Revolutionist.generate_with_friendly_output(args.shift, opts)
22
27
  end
23
28
  end
24
29
  end
data/lib/zapata.rb CHANGED
@@ -1,13 +1,12 @@
1
1
  require 'parser/current'
2
2
  require 'unparser'
3
- require 'pry'
4
- require 'pry-stack_explorer'
5
3
  require 'rails'
6
4
  require 'require_all'
7
5
  require 'file/temp'
8
6
  require 'open3'
9
7
  require 'rspec'
10
8
  require 'memoist'
9
+ require 'slop'
11
10
 
12
11
  require_rel 'zapata/core'
13
12
  require_rel 'zapata/predictor'
@@ -24,6 +23,12 @@ module Zapata
24
23
  class << self
25
24
  attr_accessor :analysis, :analysis_as_array
26
25
 
26
+ def generate_with_friendly_output(file, opts)
27
+ spec_filename = Zapata::Revolutionist.generate(file,
28
+ single: opts.single?)
29
+ puts "Its done, comrades. File #{spec_filename} was generated."
30
+ end
31
+
27
32
  def generate(filename, single: false)
28
33
  dirs = single ? [] : %w(app/models)
29
34
  file_list = Core::Collector.expand_dirs_to_files(dirs)
@@ -1,3 +1,3 @@
1
1
  module Zapata
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/zapata.gemspec CHANGED
@@ -22,8 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency 'parser', '~> 2.1'
23
23
  spec.add_runtime_dependency 'unparser', '~> 0.1'
24
24
  spec.add_runtime_dependency 'andand', '~> 1.3'
25
- spec.add_runtime_dependency 'pry', '~> 0.9'
26
- spec.add_runtime_dependency 'pry-stack_explorer', '~> 0.4'
27
25
  spec.add_runtime_dependency 'rails', '>= 3.0.0'
28
26
  spec.add_runtime_dependency 'slop', '~> 3.4'
29
27
  spec.add_runtime_dependency 'rspec-rails'
@@ -31,6 +29,8 @@ Gem::Specification.new do |spec|
31
29
  spec.add_runtime_dependency 'file-temp', '~> 1.2'
32
30
  spec.add_runtime_dependency 'rspec'
33
31
  spec.add_runtime_dependency 'memoist'
32
+ spec.add_development_dependency 'pry', '~> 0.9'
33
+ spec.add_development_dependency 'pry-stack_explorer', '~> 0.4'
34
34
  spec.add_development_dependency 'bundler', '~> 1.6'
35
35
  spec.add_development_dependency 'rake', '~> 10.0'
36
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zapata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domas Bitvinskas
@@ -52,34 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.9'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.9'
69
- - !ruby/object:Gem::Dependency
70
- name: pry-stack_explorer
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.4'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.4'
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: rails
85
57
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +150,34 @@ dependencies:
178
150
  - - ">="
179
151
  - !ruby/object:Gem::Version
180
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: pry
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.9'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.9'
167
+ - !ruby/object:Gem::Dependency
168
+ name: pry-stack_explorer
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.4'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.4'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement