furious 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +11 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +37 -0
- data/Rakefile +10 -0
- data/bin/console +7 -0
- data/bin/furious +7 -0
- data/furious.gemspec +31 -0
- data/lib/furious.rb +11 -0
- data/lib/furious/cli.rb +53 -0
- data/lib/furious/job.rb +12 -0
- data/lib/furious/package.rb +9 -0
- data/lib/furious/push.rb +27 -0
- data/lib/furious/tag.rb +16 -0
- data/lib/furious/version.rb +3 -0
- metadata +188 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 007afaf620571d99254d599e7eb0dcf32e7367e7
|
4
|
+
data.tar.gz: 5b788f0ee7c38e97281a125eb586581c6ee33a18
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8ef35e0118223a86d200d8922d04507afbdc53a5f92aadd3550147cad64e385459c50e9fd1a3cdefd281bd6af1922ea742d39ea660e5ca511755a7b2648b55e3
|
7
|
+
data.tar.gz: 30d81cd031f38e64555c8c1c695ec409a75019998c176f8bb4a71e2528d92b1e4bcf02ead9193d5b7c88dc7f76c81da7395796e0b8112903cce159c851369cb0
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Christian Sutter
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Furious
|
2
|
+
|
3
|
+
Super-simple tool to package and upload gems to Gemfury.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your gem's .gemspec:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
Gem::Specification.new do |spec|
|
11
|
+
# ...
|
12
|
+
spec.add_development_dependency 'furious'
|
13
|
+
end
|
14
|
+
```
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
- `furious package` - build a gem package
|
19
|
+
- `furious tag` - tags the version in the Git repository
|
20
|
+
- `furious push` - pushes the gem to Gemfury (requires `package` to have been run successfully, a `GEMFURY_TOKEN` environment variable to be set to your token, and a `GEMFURY_ACCOUNT` environment variable to be set to your account name)
|
21
|
+
|
22
|
+
Running `furious release` does all of the above, perfect for running in your CI environment for auto-releasing.
|
23
|
+
|
24
|
+
## Development
|
25
|
+
|
26
|
+
Run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
27
|
+
|
28
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/csutter/furious](https://github.com/csutter/furious).
|
33
|
+
|
34
|
+
|
35
|
+
## License
|
36
|
+
|
37
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/furious
ADDED
data/furious.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'furious/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'furious'
|
8
|
+
spec.version = Furious::VERSION
|
9
|
+
spec.authors = ['Christian Sutter']
|
10
|
+
spec.email = ['csutter@noreply.users.github.com']
|
11
|
+
|
12
|
+
spec.summary = 'Push gems to Gemfury, the simple way.'
|
13
|
+
spec.description = 'Packages and uploads gems to Gemfury without all the baggage of the official gem.'
|
14
|
+
spec.homepage = 'https://github.com/csutter/furious'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
spec.executables << 'furious'
|
20
|
+
|
21
|
+
spec.add_dependency 'typhoeus', '~> 0.7'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'minitest', '~> 5.7'
|
26
|
+
spec.add_development_dependency 'minitest-reporters', '~> 1.0'
|
27
|
+
spec.add_development_dependency 'mocha', '~> 1.1'
|
28
|
+
spec.add_development_dependency 'webmock', '~> 1.21'
|
29
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
30
|
+
spec.add_development_dependency 'fakefs', '~> 0.6'
|
31
|
+
end
|
data/lib/furious.rb
ADDED
data/lib/furious/cli.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
module Furious
|
2
|
+
class Cli
|
3
|
+
COMMANDS = {
|
4
|
+
'package' => 'build a gem package',
|
5
|
+
'tag' => 'tags the current gem version in the Git repository',
|
6
|
+
'push' => 'pushes the gem to Gemfury (requires a package to be present, and GEMFURY_TOKEN/GEMFURY_ACCOUNT environment variables to be set)',
|
7
|
+
'release' => 'combines `package`, `tag`, and `push`'
|
8
|
+
}
|
9
|
+
|
10
|
+
def initialize(argv)
|
11
|
+
argv ||= []
|
12
|
+
usage! unless argv.size == 1 && COMMANDS.include?(argv.first)
|
13
|
+
|
14
|
+
@command = argv.first
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
send("run_#{@command}".to_sym)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def run_package
|
24
|
+
Package.new(gemspec_file).build
|
25
|
+
end
|
26
|
+
|
27
|
+
def run_tag
|
28
|
+
Tag.new(gemspec_file).tag
|
29
|
+
end
|
30
|
+
|
31
|
+
def run_push
|
32
|
+
Push.new(gemspec_file).push
|
33
|
+
end
|
34
|
+
|
35
|
+
def run_release
|
36
|
+
run_package
|
37
|
+
run_tag
|
38
|
+
run_push
|
39
|
+
end
|
40
|
+
|
41
|
+
def gemspec_file
|
42
|
+
@gemspec_file ||= Dir['*.gemspec'].first
|
43
|
+
end
|
44
|
+
|
45
|
+
def usage!
|
46
|
+
$stderr.puts 'USAGE: furious <command>'
|
47
|
+
COMMANDS.each do |cmd, desc|
|
48
|
+
$stderr.puts " #{cmd}: #{desc}"
|
49
|
+
end
|
50
|
+
Kernel.exit(1)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/lib/furious/job.rb
ADDED
data/lib/furious/push.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
module Furious
|
2
|
+
class Push < Job
|
3
|
+
def push
|
4
|
+
Typhoeus.post(gemfury_url, body: { package: gem_package })
|
5
|
+
end
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def gemfury_url
|
10
|
+
"https://push.fury.io/#{gemfury_token}/#{gemfury_account}/"
|
11
|
+
end
|
12
|
+
|
13
|
+
def gemfury_token
|
14
|
+
fail 'No GEMFURY_TOKEN specified in environment' unless ENV['GEMFURY_TOKEN']
|
15
|
+
ENV['GEMFURY_TOKEN']
|
16
|
+
end
|
17
|
+
|
18
|
+
def gemfury_account
|
19
|
+
fail 'No GEMFURY_ACCOUNT specified in environment' unless ENV['GEMFURY_ACCOUNT']
|
20
|
+
ENV['GEMFURY_ACCOUNT']
|
21
|
+
end
|
22
|
+
|
23
|
+
def gem_package
|
24
|
+
File.open(spec.file_name, 'r')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/furious/tag.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'typhoeus'
|
2
|
+
|
3
|
+
module Furious
|
4
|
+
class Tag < Job
|
5
|
+
def tag
|
6
|
+
result = system("git tag #{tag_name} && git push origin #{tag_name}")
|
7
|
+
fail "Failed to tag #{tag_name}" unless result
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def tag_name
|
13
|
+
"v#{spec.version}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: furious
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Christian Sutter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: typhoeus
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-reporters
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mocha
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.21'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.21'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.10'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.10'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fakefs
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.6'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.6'
|
139
|
+
description: Packages and uploads gems to Gemfury without all the baggage of the official
|
140
|
+
gem.
|
141
|
+
email:
|
142
|
+
- csutter@noreply.users.github.com
|
143
|
+
executables:
|
144
|
+
- furious
|
145
|
+
extensions: []
|
146
|
+
extra_rdoc_files: []
|
147
|
+
files:
|
148
|
+
- ".gitignore"
|
149
|
+
- ".travis.yml"
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/console
|
155
|
+
- bin/furious
|
156
|
+
- furious.gemspec
|
157
|
+
- lib/furious.rb
|
158
|
+
- lib/furious/cli.rb
|
159
|
+
- lib/furious/job.rb
|
160
|
+
- lib/furious/package.rb
|
161
|
+
- lib/furious/push.rb
|
162
|
+
- lib/furious/tag.rb
|
163
|
+
- lib/furious/version.rb
|
164
|
+
homepage: https://github.com/csutter/furious
|
165
|
+
licenses:
|
166
|
+
- MIT
|
167
|
+
metadata: {}
|
168
|
+
post_install_message:
|
169
|
+
rdoc_options: []
|
170
|
+
require_paths:
|
171
|
+
- lib
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
requirements: []
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 2.2.2
|
185
|
+
signing_key:
|
186
|
+
specification_version: 4
|
187
|
+
summary: Push gems to Gemfury, the simple way.
|
188
|
+
test_files: []
|