aw 0.1.0 → 0.1.1

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: b989077c98d685045ebcd45c69269ee14a3ad99b
4
- data.tar.gz: b18c0443dba7d1b745b0b65b4b3355930dd9c0f1
3
+ metadata.gz: 2400c845c0ef400184346e499a0e86538c9535cd
4
+ data.tar.gz: 2d193851e559e88f04b88c0c700362272107cd40
5
5
  SHA512:
6
- metadata.gz: 21a889ae65582f1419f5ee12728b80d3ed20ec46bb3825d2685ce69e554c3fb1fdb7e1e955db9a1b0633074b1eff8cde027ae1a31e0c6c540a859eb3ef87ac1f
7
- data.tar.gz: e09e4098017342039cf9b948e14c05e0d7c73ee42a6650b69403235c666fb48a8fdb984283f55c43b2b0b8ac10487fe6f03f3ae8f22fc6aecef91edfb2323d13
6
+ metadata.gz: 66acc1e423db9973849e7265b737afbf096f5e5edaf69acf768df75e2fbd714c3464bf00893e27bdb5707d004146e8bcdaf8a7fb710e3c4750325163764c6310
7
+ data.tar.gz: 3c76579640852fd15ab9eb67fa84db887b6a5779b4787b74add3342ea7ac7a56d85044503b52559d2f009eaeb41a2fb54731911b58617581d6b16f0699e1c189
@@ -1,15 +1,29 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
- script: 'bundle exec rake test:coverage --trace'
5
4
  before_install:
6
5
  - gem install bundler
6
+ script:
7
+ - bundle exec rubocop
8
+ - bundle exec rake test
7
9
  rvm:
8
- - 1.9.3
9
10
  - 2.0
10
11
  - 2.1
11
12
  - 2.2
13
+ - 2.3.3
14
+ - 2.4.0
12
15
  - ruby-head
13
- - jruby
14
16
  - jruby-head
15
- - rbx-2
17
+ - rbx-3
18
+ matrix:
19
+ allow_failures:
20
+ - rvm: ruby-head
21
+ - rvm: jruby-head
22
+ - rvm: rbx-3
23
+ notifications:
24
+ webhooks:
25
+ urls:
26
+ - https://webhooks.gitter.im/e/a44b19cc5cf6db25fa87
27
+ on_success: change
28
+ on_failure: always
29
+ on_start: never
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Cyril Wack
3
+ Copyright (c) 2015 Cyril Kato
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Aw
2
2
 
3
3
  [![Build Status](https://travis-ci.org/fixrb/aw.svg?branch=master)][travis]
4
+ [![Code Climate](https://codeclimate.com/github/fixrb/aw/badges/gpa.svg)][codeclimate]
5
+ [![Dependency Status](https://gemnasium.com/fixrb/aw.svg)][gemnasium]
4
6
  [![Gem Version](https://badge.fury.io/rb/aw.svg)][gem]
5
7
  [![Inline docs](http://inch-ci.org/github/fixrb/aw.svg?branch=master)][inchpages]
6
8
  [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
@@ -19,7 +21,6 @@ Creates a subprocess to execute a block inside.
19
21
 
20
22
  * [MRI](https://www.ruby-lang.org/)
21
23
  * [Rubinius](http://rubini.us/)
22
- * [JRuby](http://jruby.org/)
23
24
 
24
25
  ## Installation
25
26
 
@@ -46,10 +47,22 @@ And then execute:
46
47
 
47
48
  ## Usage
48
49
 
50
+ Execute & return the result:
51
+
49
52
  ```ruby
50
53
  Aw.fork! { 6 * 7 } # => 42
51
54
  ```
52
55
 
56
+ Prevent from side effects:
57
+
58
+ ```ruby
59
+ arr = ['foo']
60
+
61
+ Aw.fork! { arr << 'FUU' } # => ["foo", "FUU"]
62
+
63
+ arr # => ["foo"]
64
+ ```
65
+
53
66
  ## Security
54
67
 
55
68
  As a basic form of security __Aw__ provides a set of SHA512 checksums for
@@ -81,5 +94,13 @@ See `LICENSE.md` file.
81
94
 
82
95
  [gem]: https://rubygems.org/gems/aw
83
96
  [travis]: https://travis-ci.org/fixrb/aw
84
- [inchpages]: http://inch-ci.org/github/fixrb/aw/
97
+ [codeclimate]: https://codeclimate.com/github/fixrb/aw
98
+ [gemnasium]: https://gemnasium.com/fixrb/aw
99
+ [inchpages]: http://inch-ci.org/github/fixrb/aw
85
100
  [rubydoc]: http://rubydoc.info/gems/aw/frames
101
+
102
+ ***
103
+
104
+ This project is sponsored by:
105
+
106
+ [![Sashite](http://sashite.com/img/sashite.png)](http://sashite.com/)
data/Rakefile CHANGED
@@ -17,4 +17,4 @@ namespace :test do
17
17
  end
18
18
 
19
19
  task(:doc_stats) { ruby '-S yard stats' }
20
- task default: [:test, :doc_stats, :rubocop]
20
+ task default: %i[test doc_stats]
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/aw.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'aw'
3
3
  spec.version = File.read('VERSION.semver').chomp
4
- spec.authors = ['Cyril Wack']
4
+ spec.authors = ['Cyril Kato']
5
5
  spec.email = ['contact@cyril.email']
6
6
 
7
7
  spec.summary = 'Aw, fork!'
@@ -14,11 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_development_dependency 'bundler', '~> 1.10'
18
- spec.add_development_dependency 'rake', '~> 10.4'
19
- spec.add_development_dependency 'yard', '~> 0.8'
20
- spec.add_development_dependency 'simplecov', '~> 0.10'
21
- spec.add_development_dependency 'rubocop', '~> 0.34'
17
+ spec.add_development_dependency 'bundler', '~> 1.14'
18
+ spec.add_development_dependency 'rake', '~> 12.0'
19
+ spec.add_development_dependency 'yard', '~> 0.9'
20
+ spec.add_development_dependency 'simplecov', '~> 0.14'
21
+ spec.add_development_dependency 'rubocop', '~> 0.48'
22
22
 
23
23
  spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
24
24
  private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
@@ -0,0 +1 @@
1
+ d346779ca7a2cba2429db9e6342f8caebd12ccc3a647d75ad6eac28836bb683330ecdc0b74b81d95d55f8d2954ad5d5bd5f933b022c89b0b7e0f92cf2565d525
@@ -22,13 +22,11 @@ module Aw
22
22
 
23
23
  # Run the block inside a subprocess, and return the value.
24
24
  #
25
- # @param block [Proc] The code to run in a subprocess.
26
- #
27
25
  # @return [#object_id] The result.
28
- def call(&block)
26
+ def call
29
27
  pid = fork do
30
28
  read.close
31
- result = block.call
29
+ result = yield
32
30
  Marshal.dump(result, write)
33
31
  exit!(0)
34
32
  end
metadata CHANGED
@@ -1,36 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Cyril Wack
7
+ - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDdDCCAlygAwIBAgIBATANBgkqhkiG9w0BAQUFADBAMRAwDgYDVQQDDAdjb250
14
- YWN0MRUwEwYKCZImiZPyLGQBGRYFY3lyaWwxFTATBgoJkiaJk/IsZAEZFgVlbWFp
15
- bDAeFw0xNTA3MzExMjExMDZaFw0xNjA3MzAxMjExMDZaMEAxEDAOBgNVBAMMB2Nv
16
- bnRhY3QxFTATBgoJkiaJk/IsZAEZFgVjeXJpbDEVMBMGCgmSJomT8ixkARkWBWVt
17
- YWlsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6hUEYoxnn1mtoaiK
18
- NiwjzVPqPgQCR9ZeYdWjLJ3UUG2h5Q6awJCnbaGr8LGGcKtveCDbOJRjtdKNuOTH
19
- O2FLTkf46nrMGiF+6/j//qh8o0EQHBRKIVMYkxZxZe4Fcqtdf1bWNMZuXeyoDjdt
20
- 4yiGfizbbTOu0gBf7Yrsv5DsL0a5CU/We7zxMfgGXCVb9PYkD+OWUMcTARYDKfYa
21
- nN9ECI7CFm/yXcsof/eIQA5EmJNmQnhx8B+8L6jDqQeSUAUrBZnC9CdloKOoqmEL
22
- weqM2g6LM932Ba74rEl4QlFRYDcs8kjr71UcvseHRCUkFr36j26OU8+gKelsTNdO
23
- 7OZNKQIDAQABo3kwdzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU
24
- LSJTN9h29D6bqOhp+vyvhyM0AF4wHgYDVR0RBBcwFYETY29udGFjdEBjeXJpbC5l
25
- bWFpbDAeBgNVHRIEFzAVgRNjb250YWN0QGN5cmlsLmVtYWlsMA0GCSqGSIb3DQEB
26
- BQUAA4IBAQArqCC1rUyGJlF0DF9ZhUOgggyROvO0/WroSI5zWgzdB8EU7RJpsDIV
27
- caGnpji7h0rQIGWQuJ6TL2fTFLfeGRFdIzRZwWC7TeXhcXngJHZxSjDBt2OpfM8A
28
- P5eElSQS9iJCetBGGMyt354PfgZkg3URaC+JA6mdEisdtEdo64ElnMsLg9shCqye
29
- JSR3BbejbyPVva0/MHKD+dR6RswlcM9KMiYOXQml7a/kH6huOHvVq9gj5xC2ih8W
30
- dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
- 0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
- -----END CERTIFICATE-----
33
- date: 2015-10-14 00:00:00.000000000 Z
11
+ - certs/gem-fixrb-public_cert.pem
12
+ date: 2017-04-21 00:00:00.000000000 Z
34
13
  dependencies:
35
14
  - !ruby/object:Gem::Dependency
36
15
  name: bundler
@@ -38,70 +17,70 @@ dependencies:
38
17
  requirements:
39
18
  - - "~>"
40
19
  - !ruby/object:Gem::Version
41
- version: '1.10'
20
+ version: '1.14'
42
21
  type: :development
43
22
  prerelease: false
44
23
  version_requirements: !ruby/object:Gem::Requirement
45
24
  requirements:
46
25
  - - "~>"
47
26
  - !ruby/object:Gem::Version
48
- version: '1.10'
27
+ version: '1.14'
49
28
  - !ruby/object:Gem::Dependency
50
29
  name: rake
51
30
  requirement: !ruby/object:Gem::Requirement
52
31
  requirements:
53
32
  - - "~>"
54
33
  - !ruby/object:Gem::Version
55
- version: '10.4'
34
+ version: '12.0'
56
35
  type: :development
57
36
  prerelease: false
58
37
  version_requirements: !ruby/object:Gem::Requirement
59
38
  requirements:
60
39
  - - "~>"
61
40
  - !ruby/object:Gem::Version
62
- version: '10.4'
41
+ version: '12.0'
63
42
  - !ruby/object:Gem::Dependency
64
43
  name: yard
65
44
  requirement: !ruby/object:Gem::Requirement
66
45
  requirements:
67
46
  - - "~>"
68
47
  - !ruby/object:Gem::Version
69
- version: '0.8'
48
+ version: '0.9'
70
49
  type: :development
71
50
  prerelease: false
72
51
  version_requirements: !ruby/object:Gem::Requirement
73
52
  requirements:
74
53
  - - "~>"
75
54
  - !ruby/object:Gem::Version
76
- version: '0.8'
55
+ version: '0.9'
77
56
  - !ruby/object:Gem::Dependency
78
57
  name: simplecov
79
58
  requirement: !ruby/object:Gem::Requirement
80
59
  requirements:
81
60
  - - "~>"
82
61
  - !ruby/object:Gem::Version
83
- version: '0.10'
62
+ version: '0.14'
84
63
  type: :development
85
64
  prerelease: false
86
65
  version_requirements: !ruby/object:Gem::Requirement
87
66
  requirements:
88
67
  - - "~>"
89
68
  - !ruby/object:Gem::Version
90
- version: '0.10'
69
+ version: '0.14'
91
70
  - !ruby/object:Gem::Dependency
92
71
  name: rubocop
93
72
  requirement: !ruby/object:Gem::Requirement
94
73
  requirements:
95
74
  - - "~>"
96
75
  - !ruby/object:Gem::Version
97
- version: '0.34'
76
+ version: '0.48'
98
77
  type: :development
99
78
  prerelease: false
100
79
  version_requirements: !ruby/object:Gem::Requirement
101
80
  requirements:
102
81
  - - "~>"
103
82
  - !ruby/object:Gem::Version
104
- version: '0.34'
83
+ version: '0.48'
105
84
  description: Creates a subprocess to execute a block inside.
106
85
  email:
107
86
  - contact@cyril.email
@@ -122,6 +101,7 @@ files:
122
101
  - bin/console
123
102
  - bin/setup
124
103
  - certs/gem-fixrb-public_cert.pem
104
+ - checksum/aw-0.1.0.gem.sha512
125
105
  - lib/aw.rb
126
106
  - lib/aw/fork.rb
127
107
  - pkg_checksum
@@ -145,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
125
  version: '0'
146
126
  requirements: []
147
127
  rubyforge_project:
148
- rubygems_version: 2.4.5.1
128
+ rubygems_version: 2.6.11
149
129
  signing_key:
150
130
  specification_version: 4
151
131
  summary: Aw, fork!
152
132
  test_files: []
153
- has_rdoc:
@@ -1 +0,0 @@
1
- �G*.���Γ�Ƨ�
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file