run-gem-dev 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +23 -0
- data/lib/run-gem-dev/tasks.rb +53 -0
- data/lib/run-gem-dev/version.rb +3 -0
- data/lib/run-gem-dev.rb +2 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c16a6d97c9bc6eb1c95d00fea39c81a513571937
|
4
|
+
data.tar.gz: 0da0c12c5c821d49e98f1b7280c780473a17813e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: be1272fe790e9cc7334eda22db9a3b3f12792fee06e0584dcb67613cd4f3d49d66758c251c4ecea52d97180a45ee17360be2673e8016b535667205e94913ce4f
|
7
|
+
data.tar.gz: 92f136964cd12e9170e562a58b0e625a3f3acd3323471623b0f962312d4ed1515440bf7a1ad044a5525f8dce125a9ee0268c7b6747a66a5e720762d69cc52f5a
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Run Gem Dev
|
2
|
+
===========
|
3
|
+
|
4
|
+
[Runfile](https://github.com/DannyBen/runfile) tasks for gem developers.
|
5
|
+
|
6
|
+
## Install
|
7
|
+
|
8
|
+
$ gem install run-gem-dev
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
Put this in your Runfile
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
RunGemDev::Tasks.embed 'your-gem-name'
|
16
|
+
```
|
17
|
+
|
18
|
+
|
19
|
+
## Todo
|
20
|
+
|
21
|
+
- Docs
|
22
|
+
- Tests
|
23
|
+
- Yank `gem yank gemname -v 0.1.0`
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
module RunGemDev
|
3
|
+
class Tasks
|
4
|
+
def self.embed(gemname, gemdir="gems")
|
5
|
+
command "gem"
|
6
|
+
|
7
|
+
spec = Gem::Specification::load "#{gemname}.gemspec"
|
8
|
+
spec or abort "Error loading #{gemname}.gemspec"
|
9
|
+
gemver = spec.version.to_s
|
10
|
+
|
11
|
+
usage "build [<folder>]"
|
12
|
+
help "Build gem from gemspec and move it to <folder>"
|
13
|
+
action :build do |args|
|
14
|
+
folder = args['<folder>'] || gemdir
|
15
|
+
say "Building gem..."
|
16
|
+
cmd = "gem build #{gemname}.gemspec"
|
17
|
+
say "Running #{cmd}"
|
18
|
+
system cmd
|
19
|
+
files = Dir["*.gem"]
|
20
|
+
say "Moving to gems folder"
|
21
|
+
files.each {|f| FileUtils.mv f, gemdir }
|
22
|
+
end
|
23
|
+
|
24
|
+
help "Install local gem"
|
25
|
+
action :install do
|
26
|
+
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
27
|
+
cmd = "gem install #{gemfile}"
|
28
|
+
say "Running: #{cmd}"
|
29
|
+
system cmd
|
30
|
+
end
|
31
|
+
|
32
|
+
help "Publish gem"
|
33
|
+
action :publish do
|
34
|
+
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
35
|
+
File.exist? gemfile or abort "File not found #{gemfile}"
|
36
|
+
cmd = "gem push #{gemfile}"
|
37
|
+
say "Running: #{cmd}"
|
38
|
+
system cmd
|
39
|
+
end
|
40
|
+
|
41
|
+
usage "test [<name>]"
|
42
|
+
help "Run all tests or a single test file"
|
43
|
+
action :test do |args|
|
44
|
+
name = args['<name>'] || "*"
|
45
|
+
cmd = "ruby -Itest test/test_#{name}.rb"
|
46
|
+
say "Running #{cmd}"
|
47
|
+
system cmd
|
48
|
+
end
|
49
|
+
|
50
|
+
endcommand
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/lib/run-gem-dev.rb
ADDED
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: run-gem-dev
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Danny Ben Shitrit
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: runfile
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.6'
|
41
|
+
description: A collection of gem related tasks for Runfile
|
42
|
+
email: db@dannyben.com
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- README.md
|
48
|
+
- lib/run-gem-dev.rb
|
49
|
+
- lib/run-gem-dev/tasks.rb
|
50
|
+
- lib/run-gem-dev/version.rb
|
51
|
+
homepage: https://github.com/DannyBen/run-gem-dev
|
52
|
+
licenses:
|
53
|
+
- MIT
|
54
|
+
metadata: {}
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 2.4.7
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Runfile tasks for gem developers
|
75
|
+
test_files: []
|