gemplate 2.0.4 → 2.0.5

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: 305b24bcced9127e1ffaceaadedf318f8d56eab8
4
- data.tar.gz: 95e82b249c057c6b52a608b5676d0d6aaccf62a1
3
+ metadata.gz: ad5b9b54c8d815b0cd9d1e50a1b72bcd04c58d24
4
+ data.tar.gz: de51f9d60bcf5f75fb90463f5363be2443126a73
5
5
  SHA512:
6
- metadata.gz: 4fa9449547dc76a733fa8bb9cd6e818bb8eadd098e92b675cbff690a779598c021618cc6e74885087895cae91fa8233b884d7ec5e2796a669f21264a8318c33a
7
- data.tar.gz: 5c9360f4cb9460d5a25826ff91615e04a2667dc7b56cc5eba9d1dbceda461d377af72961f02d774b3d9c6018caa4b1f8fffd0bb1ebcf64e97cef2274cba87809
6
+ metadata.gz: 8308e4b6067f6db9ccf49dd82e30c334f2f1fa7146b2629f1a105a79f63081b8404ea0f04960d63867756c7dc389c6cc683455fe3853578876d0296d8a302d60
7
+ data.tar.gz: 4fcab8e10366e8aa54a488809a170e849f03210bc956ab2030d8281bc96bf3baf4cb7e3145e4cf2b6934827390016f8ae75899f4d1b55c6b4d1598946d9eae1d
data/.circle-ruby ADDED
@@ -0,0 +1,3 @@
1
+ 2.3.1
2
+ 2.2.5
3
+ 2.1.10
data/circle.yml CHANGED
@@ -1,12 +1,6 @@
1
1
  dependencies:
2
2
  override:
3
- - 'rvm-exec 1.9.3-p551 bundle install'
4
- - 'rvm-exec 2.0.0-p645 bundle install'
5
- - 'rvm-exec 2.1.6 bundle install'
6
- - 'rvm-exec 2.2.2 bundle install'
3
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done'
7
4
  test:
8
5
  override:
9
- - 'rvm-exec 1.9.3-p551 bundle exec rake'
10
- - 'rvm-exec 2.0.0-p645 bundle exec rake'
11
- - 'rvm-exec 2.1.6 bundle exec rake'
12
- - 'rvm-exec 2.2.2 bundle exec rake'
6
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done'
data/gemplate.gemspec CHANGED
@@ -17,18 +17,18 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files spec/*`.split
18
18
  s.executables = ['gemplate']
19
19
 
20
- s.add_dependency 'rugged', '~> 0.23.0'
20
+ s.add_dependency 'rugged', '~> 0.24.0'
21
21
  s.add_dependency 'userinput', '~> 1.0.0'
22
- s.add_dependency 'octoauth', '~> 1.4.0'
23
- s.add_dependency 'octokit', '~> 4.2.0'
22
+ s.add_dependency 'octoauth', '~> 1.4.5'
23
+ s.add_dependency 'octokit', '~> 4.3.0'
24
24
  s.add_dependency 'curb', '~> 0.9.0'
25
25
  s.add_dependency 'mercenary', '~> 0.3.4'
26
26
 
27
- s.add_development_dependency 'rubocop', '~> 0.35.0'
28
- s.add_development_dependency 'rake', '~> 10.4.0'
27
+ s.add_development_dependency 'rubocop', '~> 0.42.0'
28
+ s.add_development_dependency 'rake', '~> 11.2.0'
29
29
  s.add_development_dependency 'codecov', '~> 0.1.1'
30
- s.add_development_dependency 'rspec', '~> 3.4.0'
31
- s.add_development_dependency 'fuubar', '~> 2.0.0'
32
- s.add_development_dependency 'webmock', '~> 1.22.0' # SKIP WHEN COPYING TO TEMPLATE
30
+ s.add_development_dependency 'rspec', '~> 3.5.0'
31
+ s.add_development_dependency 'fuubar', '~> 2.1.0'
32
+ s.add_development_dependency 'webmock', '~> 2.1.0' # SKIP WHEN COPYING TO TEMPLATE
33
33
  s.add_development_dependency 'vcr', '~> 3.0.0' # SKIP WHEN COPYING TO TEMPLATE
34
34
  end
data/lib/gemplate/gem.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rugged'
2
3
  require 'pathname'
3
4
  require 'fileutils'
@@ -8,8 +9,8 @@ require 'octokit'
8
9
  ##
9
10
  # Bootstrap tool for new gems
10
11
  module Gemplate
11
- TEMPLATE = "#{Pathname.new(__FILE__).parent.parent.parent}/template"
12
- LICENSE_URL = 'https://raw.githubusercontent.com/akerl/licenses/master'
12
+ TEMPLATE = "#{Pathname.new(__FILE__).parent.parent.parent}/template".freeze
13
+ LICENSE_URL = 'https://raw.githubusercontent.com/akerl/licenses/master'.freeze
13
14
 
14
15
  ##
15
16
  # Gem directory object
@@ -38,7 +39,7 @@ module Gemplate
38
39
  private
39
40
 
40
41
  def create_directory
41
- fail "#{@name} already exists" if File.exist? @name
42
+ raise "#{@name} already exists" if File.exist? @name
42
43
  FileUtils.cp_r TEMPLATE, @name
43
44
  end
44
45
 
@@ -53,7 +54,7 @@ module Gemplate
53
54
  File.open('LICENSE', 'w') do |fh|
54
55
  license = Curl::Easy.perform(url)
55
56
  if license.response_code == 404
56
- fail ArgumentError, 'Invalid license name provided'
57
+ raise ArgumentError, 'Invalid license name provided'
57
58
  end
58
59
  fh.write license.body_str
59
60
  end
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  ##
2
3
  # Declare version of module
3
4
  module Gemplate
4
- VERSION = '2.0.4'
5
+ VERSION = '2.0.5'.freeze
5
6
  end
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'fileutils'
3
4
 
4
5
  ROOT = Dir.pwd
5
- TEST_GEM_NAME = 'gemplate-test'
6
+ TEST_GEM_NAME = 'gemplate-test'.freeze
6
7
 
7
8
  describe Gemplate do
8
9
  describe '#new' do
@@ -28,12 +29,17 @@ describe Gemplate do
28
29
  FileUtils.rm_rf TEST_GEM_NAME
29
30
  end
30
31
 
32
+ after(:all) do
33
+ Dir.chdir "#{ROOT}/.test"
34
+ FileUtils.rm_rf TEST_GEM_NAME
35
+ end
36
+
31
37
  describe '#create' do
32
38
  it 'makes a directory from the template' do
33
39
  VCR.use_cassette('subject_create') do
34
40
  subject.create
35
41
  end
36
- expect(Dir.exist? TEST_GEM_NAME).to be_truthy
42
+ expect(Dir.exist?(TEST_GEM_NAME)).to be_truthy
37
43
  end
38
44
 
39
45
  it 'raises an error if the directory already exists' do
@@ -47,7 +53,7 @@ describe Gemplate do
47
53
  VCR.use_cassette('subject_create') do
48
54
  subject.create
49
55
  end
50
- expect(File.exist? "#{TEST_GEM_NAME}/LICENSE").to be_truthy
56
+ expect(File.exist?("#{TEST_GEM_NAME}/LICENSE")).to be_truthy
51
57
  end
52
58
 
53
59
  it 'fails if you try to pull a non-existent license' do
@@ -69,7 +75,7 @@ describe Gemplate do
69
75
  subject.create
70
76
  end
71
77
  expect(
72
- File.read "#{TEST_GEM_NAME}/README.md"
78
+ File.read("#{TEST_GEM_NAME}/README.md")
73
79
  ).to_not match(/^REPO_NAME/)
74
80
  end
75
81
 
@@ -78,16 +84,16 @@ describe Gemplate do
78
84
  subject.create
79
85
  end
80
86
  expect(
81
- File.exist? "#{TEST_GEM_NAME}/#{TEST_GEM_NAME}.gemspec"
87
+ File.exist?("#{TEST_GEM_NAME}/#{TEST_GEM_NAME}.gemspec")
82
88
  ).to be_truthy
83
- expect(File.exist? "#{TEST_GEM_NAME}/REPO_NAME.gemspec").to be_falsey
89
+ expect(File.exist?("#{TEST_GEM_NAME}/REPO_NAME.gemspec")).to be_falsey
84
90
  end
85
91
 
86
92
  it 'makes the git repo' do
87
93
  VCR.use_cassette('subject_create') do
88
94
  subject.create
89
95
  end
90
- expect(Dir.exist? "#{TEST_GEM_NAME}/.git").to be_truthy
96
+ expect(Dir.exist?("#{TEST_GEM_NAME}/.git")).to be_truthy
91
97
  [
92
98
  /remote\.origin\.url/,
93
99
  /branch\.master\.remote=origin/,
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,9 @@ end
9
9
 
10
10
  require 'rspec'
11
11
  require 'gemplate'
12
+ require 'webmock'
13
+
14
+ WebMock.enable!
12
15
 
13
16
  require 'vcr'
14
17
  VCR.configure do |c|
@@ -0,0 +1,3 @@
1
+ 2.3.1
2
+ 2.2.5
3
+ 2.1.10
data/template/circle.yml CHANGED
@@ -1,12 +1,6 @@
1
1
  dependencies:
2
2
  override:
3
- - 'rvm-exec 1.9.3-p551 bundle install'
4
- - 'rvm-exec 2.0.0-p645 bundle install'
5
- - 'rvm-exec 2.1.6 bundle install'
6
- - 'rvm-exec 2.2.2 bundle install'
3
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done'
7
4
  test:
8
5
  override:
9
- - 'rvm-exec 1.9.3-p551 bundle exec rake'
10
- - 'rvm-exec 2.0.0-p645 bundle exec rake'
11
- - 'rvm-exec 2.1.6 bundle exec rake'
12
- - 'rvm-exec 2.2.2 bundle exec rake'
6
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.23.0
19
+ version: 0.24.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.23.0
26
+ version: 0.24.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: userinput
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.4.0
47
+ version: 1.4.5
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.0
54
+ version: 1.4.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: octokit
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 4.2.0
61
+ version: 4.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 4.2.0
68
+ version: 4.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: curb
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.35.0
103
+ version: 0.42.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.35.0
110
+ version: 0.42.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 10.4.0
117
+ version: 11.2.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 10.4.0
124
+ version: 11.2.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: codecov
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,42 +142,42 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 3.4.0
145
+ version: 3.5.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 3.4.0
152
+ version: 3.5.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: fuubar
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 2.0.0
159
+ version: 2.1.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 2.0.0
166
+ version: 2.1.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: webmock
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.22.0
173
+ version: 2.1.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.22.0
180
+ version: 2.1.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: vcr
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -199,6 +199,7 @@ executables:
199
199
  extensions: []
200
200
  extra_rdoc_files: []
201
201
  files:
202
+ - ".circle-ruby"
202
203
  - ".gitignore"
203
204
  - ".prospectus"
204
205
  - ".rspec"
@@ -221,6 +222,7 @@ files:
221
222
  - spec/fixtures/cassettes/subject_create_twice.yml
222
223
  - spec/gemplate_spec.rb
223
224
  - spec/spec_helper.rb
225
+ - template/.circle-ruby
224
226
  - template/.gitignore
225
227
  - template/.prospectus
226
228
  - template/.rspec