runfile-tasks 0.4.3 → 0.4.4

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: 04c5c66caa0a72692794f6a8aabe599de279dc22
4
- data.tar.gz: 5be820523596ec75ff9b5ba66e2b10c2ee956c60
3
+ metadata.gz: 03b9a718c4694e682d3dede4cca46cd2d148ca64
4
+ data.tar.gz: 189e04d3ee9237a399ef190afe32ea92dd9fbcc3
5
5
  SHA512:
6
- metadata.gz: 591eb1fed5d8396b497b4805f02b41664980f72eb68955515b209a529ce2980a7cecb5da2be07894b45bed7cdcbfcc77f4d04e5e0dcd7420ba683fce8e4f7edc
7
- data.tar.gz: f86edeaf4c4d1e1147ea3a23832bb0e6f15532b9d765f27ef553db6d4241cd4a76a4495401c641a9c4a35f6379f14c87a5366bc3bb89ca7660a9d9f9b590a387
6
+ metadata.gz: ef5adf9cd9143ee551e5c646dbfcb678974ed4a77628e3a978f0ce75889171acdec6975604be4441dbdaf651d6273f75cd5f28697cba7e92686ce8ab59d1055c
7
+ data.tar.gz: 25f0d97958f6ce31d2bd18d1a1ab9eabc72cc56cf74fcf829d2082f4ef5e4c362777588a922436c4bc5f3c60d7497eda522982518b4dee0ebd23b56d4c2125be
data/README.md CHANGED
@@ -148,6 +148,12 @@ RunfileTasks::RubyGems.all 'my-gem'
148
148
 
149
149
  # Set the folder where gems are copied after they are built (default)
150
150
  RunfileTasks::RubyGems.all 'my-gem', 'gems'
151
+
152
+ # Include only the `build` and `install` tasks
153
+ RunfileTasks::RubyGems.build 'my-gem'
154
+
155
+ # Include only the `publish` and `yank` tasks
156
+ RunfileTasks::RubyGems.publish 'my-gem'
151
157
  ```
152
158
 
153
159
 
@@ -5,11 +5,14 @@ module RunfileTasks
5
5
  extend self
6
6
 
7
7
  def all(gemname, gemdir="gems")
8
- command "gem"
8
+ build gemname, gemdir
9
+ publish gemname, gemdir
10
+ end
9
11
 
10
- spec = Gem::Specification::load "#{gemname}.gemspec"
11
- spec or abort "Error loading #{gemname}.gemspec"
12
- gemver = spec.version.to_s
12
+ def build(gemname, gemdir="gems")
13
+ gemver = get_gemver gemname
14
+
15
+ command "gem"
13
16
 
14
17
  usage "build [--install]"
15
18
  help "Build gem from gemspec and move it to '#{gemdir}' folder.\nUse --install to also install it."
@@ -38,6 +41,14 @@ module RunfileTasks
38
41
  system cmd
39
42
  end
40
43
 
44
+ endcommand
45
+ end
46
+
47
+ def publish(gemname, gemdir="gems")
48
+ gemver = get_gemver gemname
49
+
50
+ command "gem"
51
+
41
52
  help "Publish gem to rubygems. Make sure to 'run gem build' before you publish."
42
53
  action :publish do
43
54
  gemfile = "gems/#{gemname}-#{gemver}.gem"
@@ -59,6 +70,12 @@ module RunfileTasks
59
70
  endcommand
60
71
  end
61
72
 
73
+ def get_gemver(gemname)
74
+ spec = Gem::Specification::load "#{gemname}.gemspec"
75
+ spec or abort "Error loading #{gemname}.gemspec"
76
+ gemver = spec.version.to_s
77
+ end
78
+
62
79
  end
63
80
 
64
81
  end
@@ -1,3 +1,3 @@
1
1
  module RunfileTasks
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-26 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: runfile
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 2.5.1
68
+ rubygems_version: 2.6.6
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: Runfile tasks collection