aw 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 6a5da242c77b5cb6b0bbdc47f38a0429f3ad2c02f4f4761fc3badad0c009873a
4
- data.tar.gz: 5c9d69b97769d728f278d1d0777b466939dfab6b4b0478c3ccd99b3c5a2eac9a
3
+ metadata.gz: 108844ab57297d801454b173b171d8cc7205e9b5adb9b2aec228feea15410e2e
4
+ data.tar.gz: 26accda077e4d0ae68766d010e88b75bc730c043397f1763a114d7ba64d39a08
5
5
  SHA512:
6
- metadata.gz: 0fc9176167d33d3b812f9deb2f2390f8de442e085c0e62aeb6054c0ca84c1672c8f02e6276fcf71fdc60deb780bbe615d30bebbd9d00acabe70e36fedff212a5
7
- data.tar.gz: 81732ef5134f9112e8a26e51de82885c838d9cc66c160c8b7578fe024873c998e62e9992840c94908198ffb96c4d269d8b69d52eb8f3736e76501bdcd34d51ae
6
+ metadata.gz: de6e87fa4e0e97666e3c4164e45c0b640f70a345fc496cf4c85978ac5c2a907474dfc42ddc75a9e4dcd812dbf3dce4ef8fecee4edd80905877764d4866007dd4
7
+ data.tar.gz: f01f516b037a730c969be90df8626a633bd1f76cdf453f3959a5293e84d864cfec716a839902e483f76033b7b26c34f2bd78efa98dee83890ddd88b15e2047a5
@@ -10,9 +10,9 @@ rvm:
10
10
  - 2.0
11
11
  - 2.1
12
12
  - 2.2
13
- - 2.3.3
14
- - 2.4.0
15
- - 2.5.0
13
+ - 2.3
14
+ - 2.4
15
+ - 2.5
16
16
  - ruby-head
17
17
  - jruby-head
18
18
  - rbx-3
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/fixrb/aw.svg?branch=master)][travis]
4
4
  [![Code Climate](https://codeclimate.com/github/fixrb/aw/badges/gpa.svg)][codeclimate]
5
- [![Dependency Status](https://gemnasium.com/fixrb/aw.svg)][gemnasium]
6
5
  [![Gem Version](https://badge.fury.io/rb/aw.svg)][gem]
7
6
  [![Inline docs](http://inch-ci.org/github/fixrb/aw.svg?branch=master)][inchpages]
8
7
  [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
@@ -15,7 +14,7 @@ Creates a subprocess to execute a block inside.
15
14
 
16
15
  * Home page: https://github.com/fixrb/aw
17
16
  * Bugs/issues: https://github.com/fixrb/aw/issues
18
- * Support: https://stackoverflow.com/questions/tagged/aw
17
+ * Support: https://stackoverflow.com/questions/tagged/fixrb
19
18
 
20
19
  ## Rubies
21
20
 
@@ -24,18 +23,7 @@ Creates a subprocess to execute a block inside.
24
23
 
25
24
  ## Installation
26
25
 
27
- __Aw__ is cryptographically signed.
28
-
29
- To be sure the gem you install hasn't been tampered with, add my public key
30
- (if you haven't already) as a trusted certificate:
31
-
32
- $ gem cert --add <(curl -Ls https://raw.github.com/fixrb/aw/master/certs/gem-fixrb-public_cert.pem)
33
- $ gem install aw -P HighSecurity
34
-
35
- The `HighSecurity` trust profile will verify all gems. All of __Aw__'s
36
- dependencies are signed.
37
-
38
- Or add this line to your application's Gemfile:
26
+ Add this line to your application's Gemfile:
39
27
 
40
28
  ```ruby
41
29
  gem 'aw'
@@ -45,6 +33,10 @@ And then execute:
45
33
 
46
34
  $ bundle
47
35
 
36
+ Or install it yourself as:
37
+
38
+ $ gem install aw
39
+
48
40
  ## Usage
49
41
 
50
42
  Execute & return the result:
@@ -95,7 +87,6 @@ See `LICENSE.md` file.
95
87
  [gem]: https://rubygems.org/gems/aw
96
88
  [travis]: https://travis-ci.org/fixrb/aw
97
89
  [codeclimate]: https://codeclimate.com/github/fixrb/aw
98
- [gemnasium]: https://gemnasium.com/fixrb/aw
99
90
  [inchpages]: http://inch-ci.org/github/fixrb/aw
100
91
  [rubydoc]: http://rubydoc.info/gems/aw/frames
101
92
 
data/Rakefile CHANGED
@@ -19,4 +19,4 @@ namespace :test do
19
19
  end
20
20
 
21
21
  task(:doc_stats) { ruby '-S yard stats' }
22
- task default: %i[test doc_stats rubocop]
22
+ task default: %i[test doc_stats]
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/aw.gemspec CHANGED
@@ -21,8 +21,4 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency 'rubocop', '~> 0.58'
22
22
  spec.add_development_dependency 'simplecov', '~> 0.16'
23
23
  spec.add_development_dependency 'yard', '~> 0.9'
24
-
25
- spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
26
- private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
27
- spec.signing_key = private_key if File.exist?(private_key)
28
24
  end
@@ -0,0 +1 @@
1
+ 7a43c3de3e6980c036ff0079ea9337e7d8f90776a25449b8d316f6ee197deca53197068cf84e5d0acad3b06e338e46c11708616fb8d1cd1bea8dba06dbfb006e
@@ -25,14 +25,8 @@ module Aw
25
25
  # Run the block inside a subprocess, and return the value.
26
26
  #
27
27
  # @return [#object_id] The result.
28
- def call
29
- pid = fork do
30
- read.close
31
- result = yield
32
- Marshal.dump(result, write)
33
- exit!(0)
34
- end
35
-
28
+ def call(*, **, &block)
29
+ pid = fork_and_return_pid(&block)
36
30
  write.close
37
31
  result = read.read
38
32
  Process.wait(pid)
@@ -41,5 +35,16 @@ module Aw
41
35
  Marshal.load(result)
42
36
  # rubocop:enable MarshalLoad
43
37
  end
38
+
39
+ private
40
+
41
+ def fork_and_return_pid
42
+ fork do
43
+ read.close
44
+ result = yield
45
+ Marshal.dump(result, write)
46
+ exit!(0)
47
+ end
48
+ end
44
49
  end
45
50
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - certs/gem-fixrb-public_cert.pem
12
- date: 2018-08-26 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2018-08-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
@@ -100,9 +99,9 @@ files:
100
99
  - aw.gemspec
101
100
  - bin/console
102
101
  - bin/setup
103
- - certs/gem-fixrb-public_cert.pem
104
102
  - checksum/aw-0.1.0.gem.sha512
105
103
  - checksum/aw-0.1.1.gem.sha512
104
+ - checksum/aw-0.1.2.gem.sha512
106
105
  - lib/aw.rb
107
106
  - lib/aw/fork.rb
108
107
  - pkg_checksum
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BAQUFADBAMRAwDgYDVQQDDAdjb250
3
- YWN0MRUwEwYKCZImiZPyLGQBGRYFY3lyaWwxFTATBgoJkiaJk/IsZAEZFgVlbWFp
4
- bDAeFw0xNTA3MzExMjExMDZaFw0xNjA3MzAxMjExMDZaMEAxEDAOBgNVBAMMB2Nv
5
- bnRhY3QxFTATBgoJkiaJk/IsZAEZFgVjeXJpbDEVMBMGCgmSJomT8ixkARkWBWVt
6
- YWlsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6hUEYoxnn1mtoaiK
7
- NiwjzVPqPgQCR9ZeYdWjLJ3UUG2h5Q6awJCnbaGr8LGGcKtveCDbOJRjtdKNuOTH
8
- O2FLTkf46nrMGiF+6/j//qh8o0EQHBRKIVMYkxZxZe4Fcqtdf1bWNMZuXeyoDjdt
9
- 4yiGfizbbTOu0gBf7Yrsv5DsL0a5CU/We7zxMfgGXCVb9PYkD+OWUMcTARYDKfYa
10
- nN9ECI7CFm/yXcsof/eIQA5EmJNmQnhx8B+8L6jDqQeSUAUrBZnC9CdloKOoqmEL
11
- weqM2g6LM932Ba74rEl4QlFRYDcs8kjr71UcvseHRCUkFr36j26OU8+gKelsTNdO
12
- 7OZNKQIDAQABo3kwdzAJBgNVHRMEAjAAMAsGA1Ud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