h2ocube_rails_development 0.1.2 → 0.1.3

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: cf34a2775ea9a1444e44f4efbc68b8ec5e25560d
4
- data.tar.gz: 3605ce56dc38c89a96fdc97baefc89128de658a3
3
+ metadata.gz: 28be39233bf28167cfc93147be354bbad1fa90b5
4
+ data.tar.gz: f36ebd02520f52eb774bb04b61a3e2d95a5403f4
5
5
  SHA512:
6
- metadata.gz: 45064095b55a4673bdef264e77d2818f65f9edab031723fe7aac7d3af3d999fab8abd6ea30079723208286a493a1f0747b96d317a95159adba7b8bdab46c7fb6
7
- data.tar.gz: dbe56102d05750d1f1c3f790f4c5ff715d67607d1946df173eb889d0a23f07de1b707099c3abcc3cc36ade620be81cdfe99969e299a5d38d06567674d0252b96
6
+ metadata.gz: e5670cac7a5d2ee7243d7787a0c277da8decf5cfa9f2db4aa20edfe1904f90af7a1eac244e06329b9a3544e6c2b19e357b953386a8c471a23e3ef5b696ea59be
7
+ data.tar.gz: 7f201e043b63869c5ff4558b9c499479c51c8e1a5647b66cc0715151a498d58dfc3ff9c935c0f33e3a8af6123f27dbbecd061466878fb2e5e9e2e6d40ca0d8b2
data/README.md CHANGED
@@ -8,7 +8,7 @@ Just a collection for development gems
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'h2ocube_rails_development', group: :development
11
+ gem 'h2ocube_rails_development'
12
12
 
13
13
  And then execute:
14
14
 
@@ -22,24 +22,45 @@ Or install it yourself as:
22
22
 
23
23
  $ rake annotate # => annotate all your models, tests, fixtures, factories and routes
24
24
  $ rake annotate:remove # => remove all annotated comments
25
+ $ rake spec # => just default rspec task
26
+ $ rake rubocop # => rubocop -R
27
+ $ rake test # => run spec and rubocop
28
+ $ rake sort # => Sort config/locales/*.yml by key
25
29
 
26
30
  more details see below
27
31
 
28
32
  ## Include
29
33
 
30
- * pry-rails https://github.com/rweng/pry-rails
31
- * pry-remote https://github.com/Mon-Ouie/pry-remote
34
+ For development & test
35
+
36
+ * factory_girl_rails https://github.com/thoughtbot/factory_girl_rails
37
+ * rspec-rails https://github.com/rspec/rspec-rails
38
+
39
+ For development only
40
+
41
+ * annotate https://github.com/ctran/annotate_models
32
42
  * better_errors https://github.com/charliesome/better_errors
33
43
  * binding_of_caller https://github.com/banister/binding_of_caller
34
44
  * meta_request https://github.com/dejan/rails_panel/tree/master/meta_request
35
- * powder https://github.com/Rodreegez/powder
45
+ * pry-rails https://github.com/rweng/pry-rails
46
+ * pry-remote https://github.com/Mon-Ouie/pry-remote
47
+
48
+ For test only
49
+
50
+ * capybara http://jnicklas.github.io/capybara
51
+ * database_cleaner https://github.com/bmabey/database_cleaner
52
+ * timecop https://github.com/travisjeffery/timecop
53
+
54
+ Just installed but not required
55
+
36
56
  * capistrano https://github.com/capistrano/capistrano
37
- * capistrano-rbenv https://github.com/capistrano/rbenv
38
57
  * capistrano-bundler https://github.com/capistrano/bundler
39
58
  * capistrano-rails https://github.com/capistrano/rails
40
- * vendorer https://github.com/grosser/vendorer
59
+ * capistrano-rbenv https://github.com/capistrano/rbenv
60
+ * powder https://github.com/Rodreegez/powder
61
+ * rubocop https://github.com/bbatsov/rubocop
41
62
  * spring https://github.com/rails/spring
42
- * annotate https://github.com/ctran/annotate_models
63
+ * vendorer https://github.com/grosser/vendorer
43
64
 
44
65
  ## Contributing
45
66
 
@@ -1,33 +1,47 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
 
5
4
  Gem::Specification.new do |spec|
6
5
  spec.name = 'h2ocube_rails_development'
7
- spec.version = '0.1.2'
6
+ spec.version = '0.1.3'
8
7
  spec.authors = ['Ben']
9
8
  spec.email = ['ben@zfben.com']
10
9
  spec.description = %q{Just a collection for development gems}
11
10
  spec.summary = %q{Just a collection for development gems}
12
11
  spec.homepage = 'https://github.com/h2ocube/h2ocube_rails_development'
13
12
  spec.license = 'MIT'
13
+ spec.required_ruby_version = '~> 2.0'
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'pry-rails'
21
- spec.add_dependency 'pry-remote'
20
+ # for development & test
21
+ spec.add_dependency 'factory_girl_rails'
22
+ spec.add_dependency 'rspec-rails'
23
+
24
+ # for development only
25
+
26
+ spec.add_dependency 'annotate'
22
27
  spec.add_dependency 'better_errors'
23
28
  spec.add_dependency 'binding_of_caller'
24
29
  spec.add_dependency 'meta_request'
25
- spec.add_dependency 'powder'
26
- spec.add_dependency 'vendorer'
30
+ spec.add_dependency 'pry-rails'
31
+ spec.add_dependency 'pry-remote'
32
+
33
+ # for test only
34
+ spec.add_dependency 'capybara'
35
+ spec.add_dependency 'database_cleaner'
36
+ spec.add_dependency 'timecop'
37
+
38
+ # install but don't require
27
39
  spec.add_dependency 'capistrano', '~> 3.0'
28
- spec.add_dependency 'capistrano-rbenv', '~> 2.0'
29
40
  spec.add_dependency 'capistrano-bundler'
30
41
  spec.add_dependency 'capistrano-rails'
42
+ spec.add_dependency 'capistrano-rbenv', '~> 2.0'
43
+ spec.add_dependency 'powder'
44
+ spec.add_dependency 'rubocop'
31
45
  spec.add_dependency 'spring'
32
- spec.add_dependency 'annotate'
46
+ spec.add_dependency 'vendorer'
33
47
  end
@@ -1,4 +1,9 @@
1
- %w(pry-rails pry-remote better_errors binding_of_caller meta_request annotate).each{ |gem| require gem }
1
+ %w(factory_girl_rails rspec-rails).each{ |gem| require gem } if Rails.env.development? || Rails.env.test?
2
+
3
+ %w(annotate better_errors binding_of_caller meta_request pry-rails pry-remote).each{ |gem| require gem } if Rails.env.development?
4
+
5
+ %w(capybara database_cleaner timecop).each{ |gem| require gem } if Rails.env.test?
6
+
2
7
 
3
8
  module H2ocubeRailsDevelopment
4
9
  class Railtie < Rails::Railtie
@@ -14,6 +19,34 @@ module H2ocubeRailsDevelopment
14
19
  task 'annotate:remove' do
15
20
  system 'bundle exec annotate -d;bundle exec annotate -r -d'
16
21
  end
22
+
23
+ desc 'run rubocop'
24
+ task :rubocop do
25
+ system 'bundle exec rubocop -R'
26
+ end
27
+
28
+ desc 'run spec and rubocop'
29
+ task test: %i(spec rubocop)
30
+
31
+ desc 'Sort config/locales/*.yml by key'
32
+ task :sort do
33
+ def deeply_sort_hash(object)
34
+ return object unless object.is_a?(Hash)
35
+ hash = Hash.new
36
+ object.each { |k, v| hash[k] = deeply_sort_hash(v) }
37
+ sorted = hash.sort { |a, b| a[0].to_s <=> b[0].to_s }
38
+ hash.class[sorted]
39
+ end
40
+
41
+ Dir[Rails.root.join('config/locales/*.yml')].each do |f|
42
+ STDOUT.print (f)
43
+ hash = deeply_sort_hash(YAML.load(File.read(f)))
44
+ File.open(f, 'w') { |file|
45
+ file.write hash.to_yaml
46
+ }
47
+ STDOUT.print ("...done!\n")
48
+ end
49
+ end
17
50
  end
18
51
  end
19
- end
52
+ end if Rails.env.development?
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2ocube_rails_development
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-18 00:00:00.000000000 Z
11
+ date: 2014-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pry-rails
14
+ name: factory_girl_rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,21 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: pry-remote
28
+ name: rspec-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: annotate
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
@@ -81,7 +95,7 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: powder
98
+ name: pry-rails
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - ">="
@@ -95,7 +109,49 @@ dependencies:
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: vendorer
112
+ name: pry-remote
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: capybara
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: database_cleaner
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: timecop
99
155
  requirement: !ruby/object:Gem::Requirement
100
156
  requirements:
101
157
  - - ">="
@@ -122,6 +178,34 @@ dependencies:
122
178
  - - "~>"
123
179
  - !ruby/object:Gem::Version
124
180
  version: '3.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: capistrano-bundler
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: capistrano-rails
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
125
209
  - !ruby/object:Gem::Dependency
126
210
  name: capistrano-rbenv
127
211
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +221,7 @@ dependencies:
137
221
  - !ruby/object:Gem::Version
138
222
  version: '2.0'
139
223
  - !ruby/object:Gem::Dependency
140
- name: capistrano-bundler
224
+ name: powder
141
225
  requirement: !ruby/object:Gem::Requirement
142
226
  requirements:
143
227
  - - ">="
@@ -151,7 +235,7 @@ dependencies:
151
235
  - !ruby/object:Gem::Version
152
236
  version: '0'
153
237
  - !ruby/object:Gem::Dependency
154
- name: capistrano-rails
238
+ name: rubocop
155
239
  requirement: !ruby/object:Gem::Requirement
156
240
  requirements:
157
241
  - - ">="
@@ -179,7 +263,7 @@ dependencies:
179
263
  - !ruby/object:Gem::Version
180
264
  version: '0'
181
265
  - !ruby/object:Gem::Dependency
182
- name: annotate
266
+ name: vendorer
183
267
  requirement: !ruby/object:Gem::Requirement
184
268
  requirements:
185
269
  - - ">="
@@ -216,9 +300,9 @@ require_paths:
216
300
  - lib
217
301
  required_ruby_version: !ruby/object:Gem::Requirement
218
302
  requirements:
219
- - - ">="
303
+ - - "~>"
220
304
  - !ruby/object:Gem::Version
221
- version: '0'
305
+ version: '2.0'
222
306
  required_rubygems_version: !ruby/object:Gem::Requirement
223
307
  requirements:
224
308
  - - ">="
@@ -231,4 +315,3 @@ signing_key:
231
315
  specification_version: 4
232
316
  summary: Just a collection for development gems
233
317
  test_files: []
234
- has_rdoc: