parse_gemspec 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.conventional-changelog.context.js +17 -0
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/bin/setup +6 -0
- data/changelog.md +12 -0
- data/lib/parse_gemspec/error.rb +4 -0
- data/lib/parse_gemspec/specification.rb +4 -2
- data/lib/parse_gemspec/version.rb +1 -1
- data/lib/parse_gemspec.rb +1 -0
- data/package.json +11 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d60d7ca151df62edb7a8316a387e12325bfa4d0
|
4
|
+
data.tar.gz: 01cf8854ba930e11684e2cc1c381ab2889787eba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57bd04a3dcbfedcc5a47a2a4fe566efe74a6bca0e2e90d871d9043d4b68099330bd51cd4a46fa26a15e4f50455d6bb87af4bd8928b0e97be242093e208888fb8
|
7
|
+
data.tar.gz: ca2faf73ba5fd3ad7237f5686631cce9e475b754bcf319a2dcf751619b26a56f4775d50fe5e21463e58bc234b9c91a567dc2c2bbdce0fe075f06c677beb057e4
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
var execSync = require('child_process').execSync;
|
3
|
+
var URI = require('urijs');
|
4
|
+
|
5
|
+
var gemspec = JSON.parse(execSync('bundle exec parse-gemspec-cli parse_gemspec.gemspec'));
|
6
|
+
var homepageUrl = gemspec.homepage;
|
7
|
+
var url = new URI(homepageUrl);
|
8
|
+
var host = url.protocol() + '://' + url.authority();
|
9
|
+
var owner = url.pathname().split('/')[1];
|
10
|
+
var repository = url.pathname().split('/')[2];
|
11
|
+
|
12
|
+
module.exports = {
|
13
|
+
version: gemspec.version,
|
14
|
+
host: host,
|
15
|
+
owner: owner,
|
16
|
+
repository: repository
|
17
|
+
};
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/bin/setup
CHANGED
@@ -11,3 +11,9 @@ unless ENV['CI']
|
|
11
11
|
$stderr.puts err
|
12
12
|
exit status.exitstatus if !status.exitstatus.nil? && status.exitstatus != 0
|
13
13
|
end
|
14
|
+
unless ENV['CI']
|
15
|
+
out, err, status = Open3.capture3(*%w(npm install))
|
16
|
+
$stdout.puts out
|
17
|
+
$stderr.puts err
|
18
|
+
exit status.exitstatus if !status.exitstatus.nil? && status.exitstatus != 0
|
19
|
+
end
|
data/changelog.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
<a name="0.3.0"></a>
|
2
|
+
# [0.3.0](https://github.com/packsaddle/ruby-parse_gemspec/compare/v0.2.0...v0.3.0) (2015-09-24)
|
3
|
+
|
4
|
+
* Add error.
|
5
|
+
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **specification:** argument is file ([2a8e375](https://github.com/packsaddle/ruby-parse_gemspec/commit/2a8e375))
|
10
|
+
|
11
|
+
|
12
|
+
|
1
13
|
<a name"0.2.0"></a>
|
2
14
|
### 0.2.0 (2015-09-23)
|
3
15
|
|
@@ -3,8 +3,10 @@ module ParseGemspec
|
|
3
3
|
extend Forwardable
|
4
4
|
def_delegators :@spec, :name, :version, :homepage
|
5
5
|
|
6
|
-
def self.load(
|
7
|
-
|
6
|
+
def self.load(file)
|
7
|
+
fail GemspecFileNotFoundError, "file: #{file}" unless File.file?(file)
|
8
|
+
spec = Gem::Specification.load(file)
|
9
|
+
fail ParseGemspecError, "file: #{file}" unless spec
|
8
10
|
new(spec)
|
9
11
|
end
|
10
12
|
|
data/lib/parse_gemspec.rb
CHANGED
data/package.json
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"devDependencies": {
|
3
|
+
"conventional-changelog": "0.4.3",
|
4
|
+
"npm-check-updates": "^2.2.3",
|
5
|
+
"urijs": "^1.16.1"
|
6
|
+
},
|
7
|
+
"scripts": {
|
8
|
+
"changelog": "conventional-changelog -i changelog.md --overwrite --preset angular --context .conventional-changelog.context.js",
|
9
|
+
"ncu": "ncu -u"
|
10
|
+
}
|
11
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parse_gemspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,6 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".conventional-changelog.context.js"
|
62
63
|
- ".gitignore"
|
63
64
|
- ".gitmodules"
|
64
65
|
- ".rubocop.yml"
|
@@ -76,8 +77,10 @@ files:
|
|
76
77
|
- example/setup.rb
|
77
78
|
- lib/parse_gemspec.rb
|
78
79
|
- lib/parse_gemspec/constants.rb
|
80
|
+
- lib/parse_gemspec/error.rb
|
79
81
|
- lib/parse_gemspec/specification.rb
|
80
82
|
- lib/parse_gemspec/version.rb
|
83
|
+
- package.json
|
81
84
|
- parse_gemspec.gemspec
|
82
85
|
homepage: https://github.com/packsaddle/ruby-parse_gemspec
|
83
86
|
licenses:
|