gem_bootstrap 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### 0.2.2
2
+
3
+ - Support ruby version 1.9.3+ onward
4
+ - Use 'activesupport-core-ext' instead of 'agile_utils'
5
+
1
6
  #### 0.2.1
2
7
 
3
8
  - Make ruby 2.1.0+ mandatory for refinement support
data/Gemfile CHANGED
@@ -1,4 +1,2 @@
1
1
  source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in valid_filename.gemspec
4
2
  gemspec
@@ -11,9 +11,9 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = %q(Bootstrap the creation of ruby gem so that you don't have to start from scratch)
12
12
  spec.description = %q(Bootstrap the creation of ruby gem so that you don't have to start from scratch.
13
13
  Build with simple, sensible default and very easy to extend.
14
- TL;DR create new gem with `gem_bootstrap awesome_gem -g github_id -e your@email.com -a 'John Guru'`)
14
+ TL;DR; create new gem with `gem_bootstrap awesome_gem -g github_id -e your@email.com -a 'John Guru'`)
15
15
  spec.homepage = "https://github.com/agilecreativity/gem_bootstrap"
16
- spec.required_ruby_version = ">= 2.1.0"
16
+ spec.required_ruby_version = ">= 1.9.3"
17
17
  spec.license = "MIT"
18
18
  spec.files = Dir.glob("{bin,lib,templates}/**/*") + %w[Gemfile
19
19
  Rakefile
@@ -26,18 +26,15 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
27
  spec.test_files = Dir.glob("test/**/*")
28
28
  spec.require_paths = ["lib"]
29
-
30
- spec.add_runtime_dependency "thor", "~> 0.19.1"
31
29
  spec.add_runtime_dependency "grit", "~> 2.5.0"
32
- spec.add_runtime_dependency "agile_utils", "~> 0.2.1"
33
-
30
+ spec.add_runtime_dependency "thor", "~> 0.19.1"
34
31
  spec.add_development_dependency "awesome_print", "~> 1.2.0"
35
- spec.add_development_dependency "bundler", "~> 1.6.2"
32
+ spec.add_development_dependency "bundler", "~> 1.7.0"
36
33
  spec.add_development_dependency "gem-ctags", "~> 1.0.6"
37
- spec.add_development_dependency "minitest", "~> 5.4.0"
38
- spec.add_development_dependency "minitest-spec-context", "~> 0.0.3"
39
34
  spec.add_development_dependency "guard", "~> 2.6.1"
40
35
  spec.add_development_dependency "guard-minitest", "~> 2.3.1"
36
+ spec.add_development_dependency "minitest", "~> 5.4.0"
37
+ spec.add_development_dependency "minitest-spec-context", "~> 0.0.3"
41
38
  spec.add_development_dependency "pry", "~> 0.10.0"
42
39
  spec.add_development_dependency "rake", "~> 10.3.2"
43
40
  spec.add_development_dependency "rubocop", "~> 0.24.1"
@@ -1,11 +1,8 @@
1
1
  require "thor"
2
- require "agile_utils"
3
2
  require_relative "./misc_utils"
4
3
  require_relative "./git_utils"
5
4
  module GemBootstrap
6
5
  class CLI < Thor::Group
7
- using AgileUtils::HashExt
8
- using AgileUtils::BlankExt
9
6
  include Thor::Actions
10
7
 
11
8
  argument :name
@@ -39,7 +36,6 @@ module GemBootstrap
39
36
  template "../../templates/bin/newgem", "#{name}/bin/#{name}"
40
37
  template "../../templates/lib/newgem.rb", "#{name}/lib/#{name}.rb"
41
38
  template "../../templates/lib/newgem/version.rb", "#{name}/lib/#{name}/version.rb"
42
- template "../../templates/lib/newgem/logger.rb", "#{name}/lib/#{name}/logger.rb"
43
39
  template "../../templates/lib/newgem/cli.rb", "#{name}/lib/#{name}/cli.rb"
44
40
  template "../../templates/lib/newgem/newgem.rb", "#{name}/lib/#{name}/#{name}.rb"
45
41
  template "../../templates/test/test_helper.rb", "#{name}/test/test_helper.rb"
@@ -1,3 +1,3 @@
1
1
  module GemBootstrap
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/gem_bootstrap.rb CHANGED
@@ -3,5 +3,4 @@ require_relative "./gem_bootstrap/cli"
3
3
  require_relative "./gem_bootstrap/git_utils"
4
4
  require_relative "./gem_bootstrap/misc_utils"
5
5
  require_relative "./gem_bootstrap/gem_bootstrap"
6
-
7
6
  include GemBootstrap
data/templates/Gemfile CHANGED
@@ -1,4 +1,2 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in valid_filename.gemspec
4
2
  gemspec
data/templates/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
3
  project_name = '<%= name %>'
4
-
5
4
  Rake::TestTask.new do |t|
6
5
  t.libs << "lib/#{project_name}"
7
6
  t.test_files = FileList["test/lib/#{project_name}/test_*.rb"]
@@ -20,14 +20,6 @@ MethodLength:
20
20
  BlockNesting:
21
21
  Max: 4
22
22
 
23
- # Align with the style guide.
24
- CollectionMethods:
25
- PreferredMethods:
26
- collect: 'map'
27
- inject: 'reduce'
28
- find: 'detect'
29
- find_all: 'select'
30
-
31
23
  AccessModifierIndentation:
32
24
  Enabled: false
33
25
 
@@ -1,9 +1,6 @@
1
- require 'agile_utils'
2
1
  require 'thor'
3
2
  module <%= MiscUtils.camel_case(name) %>
4
3
  class CLI < Thor
5
- using AgileUtils::HashExt
6
-
7
4
  desc 'execute', 'Execute the main program'
8
5
  method_option 'version',
9
6
  aliases: '-v',
@@ -1,5 +1,10 @@
1
+ # Make use of core_extension (don't invent the wheel)
2
+ require 'active_support'
3
+ require 'active_support/core_ext/object/blank'
4
+ require 'active_support/core_ext/hash/keys'
5
+ require 'active_support/core_ext/hash/indifferent_access'
6
+ require 'active_support/core_ext/kernel/reporting'
1
7
  require_relative '<%= name %>/version'
2
- require_relative '<%= name %>/logger'
3
8
  require_relative '<%= name %>/<%= name %>'
4
9
  require_relative '<%= name %>/cli'
5
10
  include <%= MiscUtils.camel_case(name) %>
@@ -10,18 +10,18 @@ Gem::Specification.new do |spec|
10
10
  spec.summary = %q{CLI template for <%= MiscUtils.camel_case(name) %>}
11
11
  spec.description = %q{The starting template for <%= MiscUtils.camel_case(name) %>}
12
12
  spec.homepage = 'https://github.com/<%= options[:github_id] %>/<%= name %>'
13
- spec.required_ruby_version = ">= 2.1.0"
13
+ spec.required_ruby_version = ">= 1.9.3"
14
14
  spec.license = 'MIT'
15
15
  spec.files = `git ls-files -z`.split("\x0")
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_runtime_dependency 'activesupport-core-ext', '~> 4.0.0.2'
20
21
  spec.add_runtime_dependency 'thor', '~> 0.19.1'
21
- spec.add_runtime_dependency 'agile_utils', '~> 0.2.1'
22
22
 
23
23
  spec.add_development_dependency 'awesome_print', '~> 1.2.0'
24
- spec.add_development_dependency 'bundler', '~> 1.6.2'
24
+ spec.add_development_dependency 'bundler', '~> 1.7.0'
25
25
  spec.add_development_dependency 'gem-ctags', '~> 1.0.6'
26
26
  spec.add_development_dependency 'guard', '~> 2.6.1'
27
27
  spec.add_development_dependency 'guard-minitest', '~> 2.3.1'
@@ -1,5 +1,4 @@
1
1
  require_relative "../../test_helper"
2
- require "fileutils"
3
2
  describe GemBootstrap do
4
3
  context "#dummy_test" do
5
4
  it "must pass the simple test" do
metadata CHANGED
@@ -1,215 +1,228 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Burin Choomnuan
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-07-31 00:00:00.000000000 Z
12
+ date: 2014-08-14 00:00:00.000000000 Z
12
13
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: thor
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.19.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.19.1
27
14
  - !ruby/object:Gem::Dependency
28
15
  name: grit
29
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
30
18
  requirements:
31
- - - "~>"
19
+ - - ~>
32
20
  - !ruby/object:Gem::Version
33
21
  version: 2.5.0
34
22
  type: :runtime
35
23
  prerelease: false
36
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
37
26
  requirements:
38
- - - "~>"
27
+ - - ~>
39
28
  - !ruby/object:Gem::Version
40
29
  version: 2.5.0
41
30
  - !ruby/object:Gem::Dependency
42
- name: agile_utils
31
+ name: thor
43
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
44
34
  requirements:
45
- - - "~>"
35
+ - - ~>
46
36
  - !ruby/object:Gem::Version
47
- version: 0.2.1
37
+ version: 0.19.1
48
38
  type: :runtime
49
39
  prerelease: false
50
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
51
42
  requirements:
52
- - - "~>"
43
+ - - ~>
53
44
  - !ruby/object:Gem::Version
54
- version: 0.2.1
45
+ version: 0.19.1
55
46
  - !ruby/object:Gem::Dependency
56
47
  name: awesome_print
57
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
58
50
  requirements:
59
- - - "~>"
51
+ - - ~>
60
52
  - !ruby/object:Gem::Version
61
53
  version: 1.2.0
62
54
  type: :development
63
55
  prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
65
58
  requirements:
66
- - - "~>"
59
+ - - ~>
67
60
  - !ruby/object:Gem::Version
68
61
  version: 1.2.0
69
62
  - !ruby/object:Gem::Dependency
70
63
  name: bundler
71
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
72
66
  requirements:
73
- - - "~>"
67
+ - - ~>
74
68
  - !ruby/object:Gem::Version
75
- version: 1.6.2
69
+ version: 1.7.0
76
70
  type: :development
77
71
  prerelease: false
78
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
79
74
  requirements:
80
- - - "~>"
75
+ - - ~>
81
76
  - !ruby/object:Gem::Version
82
- version: 1.6.2
77
+ version: 1.7.0
83
78
  - !ruby/object:Gem::Dependency
84
79
  name: gem-ctags
85
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
86
82
  requirements:
87
- - - "~>"
83
+ - - ~>
88
84
  - !ruby/object:Gem::Version
89
85
  version: 1.0.6
90
86
  type: :development
91
87
  prerelease: false
92
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
93
90
  requirements:
94
- - - "~>"
91
+ - - ~>
95
92
  - !ruby/object:Gem::Version
96
93
  version: 1.0.6
97
94
  - !ruby/object:Gem::Dependency
98
- name: minitest
95
+ name: guard
99
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
100
98
  requirements:
101
- - - "~>"
99
+ - - ~>
102
100
  - !ruby/object:Gem::Version
103
- version: 5.4.0
101
+ version: 2.6.1
104
102
  type: :development
105
103
  prerelease: false
106
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
107
106
  requirements:
108
- - - "~>"
107
+ - - ~>
109
108
  - !ruby/object:Gem::Version
110
- version: 5.4.0
109
+ version: 2.6.1
111
110
  - !ruby/object:Gem::Dependency
112
- name: minitest-spec-context
111
+ name: guard-minitest
113
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 0.0.3
117
+ version: 2.3.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
121
122
  requirements:
122
- - - "~>"
123
+ - - ~>
123
124
  - !ruby/object:Gem::Version
124
- version: 0.0.3
125
+ version: 2.3.1
125
126
  - !ruby/object:Gem::Dependency
126
- name: guard
127
+ name: minitest
127
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
128
130
  requirements:
129
- - - "~>"
131
+ - - ~>
130
132
  - !ruby/object:Gem::Version
131
- version: 2.6.1
133
+ version: 5.4.0
132
134
  type: :development
133
135
  prerelease: false
134
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
135
138
  requirements:
136
- - - "~>"
139
+ - - ~>
137
140
  - !ruby/object:Gem::Version
138
- version: 2.6.1
141
+ version: 5.4.0
139
142
  - !ruby/object:Gem::Dependency
140
- name: guard-minitest
143
+ name: minitest-spec-context
141
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
142
146
  requirements:
143
- - - "~>"
147
+ - - ~>
144
148
  - !ruby/object:Gem::Version
145
- version: 2.3.1
149
+ version: 0.0.3
146
150
  type: :development
147
151
  prerelease: false
148
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
149
154
  requirements:
150
- - - "~>"
155
+ - - ~>
151
156
  - !ruby/object:Gem::Version
152
- version: 2.3.1
157
+ version: 0.0.3
153
158
  - !ruby/object:Gem::Dependency
154
159
  name: pry
155
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
156
162
  requirements:
157
- - - "~>"
163
+ - - ~>
158
164
  - !ruby/object:Gem::Version
159
165
  version: 0.10.0
160
166
  type: :development
161
167
  prerelease: false
162
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
163
170
  requirements:
164
- - - "~>"
171
+ - - ~>
165
172
  - !ruby/object:Gem::Version
166
173
  version: 0.10.0
167
174
  - !ruby/object:Gem::Dependency
168
175
  name: rake
169
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
170
178
  requirements:
171
- - - "~>"
179
+ - - ~>
172
180
  - !ruby/object:Gem::Version
173
181
  version: 10.3.2
174
182
  type: :development
175
183
  prerelease: false
176
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
177
186
  requirements:
178
- - - "~>"
187
+ - - ~>
179
188
  - !ruby/object:Gem::Version
180
189
  version: 10.3.2
181
190
  - !ruby/object:Gem::Dependency
182
191
  name: rubocop
183
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
184
194
  requirements:
185
- - - "~>"
195
+ - - ~>
186
196
  - !ruby/object:Gem::Version
187
197
  version: 0.24.1
188
198
  type: :development
189
199
  prerelease: false
190
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
191
202
  requirements:
192
- - - "~>"
203
+ - - ~>
193
204
  - !ruby/object:Gem::Version
194
205
  version: 0.24.1
195
206
  - !ruby/object:Gem::Dependency
196
207
  name: yard
197
208
  requirement: !ruby/object:Gem::Requirement
209
+ none: false
198
210
  requirements:
199
- - - "~>"
211
+ - - ~>
200
212
  - !ruby/object:Gem::Version
201
213
  version: 0.8.7
202
214
  type: :development
203
215
  prerelease: false
204
216
  version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
205
218
  requirements:
206
- - - "~>"
219
+ - - ~>
207
220
  - !ruby/object:Gem::Version
208
221
  version: 0.8.7
209
- description: |-
210
- Bootstrap the creation of ruby gem so that you don't have to start from scratch.
211
- Build with simple, sensible default and very easy to extend.
212
- TL;DR create new gem with `gem_bootstrap awesome_gem -g github_id -e your@email.com -a 'John Guru'`
222
+ description: ! "Bootstrap the creation of ruby gem so that you don't have to start
223
+ from scratch.\n Build with simple, sensible default and
224
+ very easy to extend.\n TL;DR; create new gem with `gem_bootstrap
225
+ awesome_gem -g github_id -e your@email.com -a 'John Guru'`"
213
226
  email:
214
227
  - agilecreativity@gmail.com
215
228
  executables:
@@ -217,21 +230,13 @@ executables:
217
230
  extensions: []
218
231
  extra_rdoc_files: []
219
232
  files:
220
- - ".gitignore"
221
- - ".rubocop.yml"
222
- - CHANGELOG.md
223
- - Gemfile
224
- - LICENSE
225
- - README.md
226
- - Rakefile
227
233
  - bin/gem_bootstrap
228
- - gem_bootstrap.gemspec
229
- - lib/gem_bootstrap.rb
230
234
  - lib/gem_bootstrap/cli.rb
231
235
  - lib/gem_bootstrap/gem_bootstrap.rb
232
236
  - lib/gem_bootstrap/git_utils.rb
233
237
  - lib/gem_bootstrap/misc_utils.rb
234
238
  - lib/gem_bootstrap/version.rb
239
+ - lib/gem_bootstrap.rb
235
240
  - templates/CHANGELOGS.md
236
241
  - templates/GNU_LICENSE
237
242
  - templates/Gemfile
@@ -243,39 +248,47 @@ files:
243
248
  - templates/dot_gitignore
244
249
  - templates/dot_rubocop.yml
245
250
  - templates/dot_yardopts
246
- - templates/lib/newgem.rb
247
251
  - templates/lib/newgem/cli.rb
248
- - templates/lib/newgem/logger.rb
249
252
  - templates/lib/newgem/newgem.rb
250
253
  - templates/lib/newgem/version.rb
254
+ - templates/lib/newgem.rb
251
255
  - templates/newgem.gemspec.tt
252
256
  - templates/test/lib/newgem/test_newgem.rb
253
257
  - templates/test/test_helper.rb
258
+ - Gemfile
259
+ - Rakefile
260
+ - gem_bootstrap.gemspec
261
+ - README.md
262
+ - CHANGELOG.md
263
+ - LICENSE
264
+ - .rubocop.yml
265
+ - .gitignore
254
266
  - test/lib/gem_bootstrap/test_gem_bootstrap.rb
255
267
  - test/test_helper.rb
256
268
  homepage: https://github.com/agilecreativity/gem_bootstrap
257
269
  licenses:
258
270
  - MIT
259
- metadata: {}
260
271
  post_install_message:
261
272
  rdoc_options: []
262
273
  require_paths:
263
274
  - lib
264
275
  required_ruby_version: !ruby/object:Gem::Requirement
276
+ none: false
265
277
  requirements:
266
- - - ">="
278
+ - - ! '>='
267
279
  - !ruby/object:Gem::Version
268
- version: 2.1.0
280
+ version: 1.9.3
269
281
  required_rubygems_version: !ruby/object:Gem::Requirement
282
+ none: false
270
283
  requirements:
271
- - - ">="
284
+ - - ! '>='
272
285
  - !ruby/object:Gem::Version
273
286
  version: '0'
274
287
  requirements: []
275
288
  rubyforge_project:
276
- rubygems_version: 2.2.2
289
+ rubygems_version: 1.8.23.2
277
290
  signing_key:
278
- specification_version: 4
291
+ specification_version: 3
279
292
  summary: Bootstrap the creation of ruby gem so that you don't have to start from scratch
280
293
  test_files:
281
294
  - test/lib/gem_bootstrap/test_gem_bootstrap.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 2b5602b8c6206e53bbe3feb0d48f3d0c61611d44
4
- data.tar.gz: 5612bee2f396b044d2e8a99d3049582339c4e92a
5
- SHA512:
6
- metadata.gz: 00d58b1957cb638edd7c021d5ec30c7a43a461179c3d7bf02befd4dbaf1ecadef316987e18dcfeb6f02cc3ab51b1d9f83ffa867fa3ace7938b2bc9563e275bda
7
- data.tar.gz: 84640978e5939d564bff705ba7ce87d98e98efc6683a51e587a086306e9683f780bf89790f40fcc34ad84552eac0e90e80faf3342f0e1638a30bfa42bdc82454
@@ -1,10 +0,0 @@
1
- require 'logger'
2
- module <%= MiscUtils.camel_case(name) %>
3
- class << self
4
- attr_writer :logger
5
- # @return [Logger] the logger for the project
6
- def logger
7
- @logger ||= Logger.new STDOUT
8
- end
9
- end
10
- end