modulation 1.0.1 → 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
  SHA256:
3
- metadata.gz: 79d44ad3050dcd57ba2c0ca917d16179197fa4ffe12e12aa7de42a050e8872c3
4
- data.tar.gz: 643f1853f37b82fe0e49f62d99db0120696d5e0fa11b4d93faa5d0b9eed60070
3
+ metadata.gz: 00220ad836145e69affe04c22c0a4c699ecb68e7b5598671bf7820834572ce78
4
+ data.tar.gz: 0d2546469547d80482952f47ae89fed0996902419d33f51be8b529d65db6283a
5
5
  SHA512:
6
- metadata.gz: 3df78b0f925e7d2f6ddd5547c46755d51a89a76f6aba84bdd02871e456de7bdbbd1c458e46f92d7cbbd3c782b8051abfac3ace1b60853e97e7fc3694e90b3c7b
7
- data.tar.gz: f7ae45414fca8d849e521efc4980e6a30b9dd1678b9f21a2b8ce438626369e77845bef4cd4be676bd67cdeb39e2b05153d9a9e5b7f9134818d7beba93280bd17
6
+ metadata.gz: f56cc035c0332697d5e7a89dc46c42e880f8dcd214832ec62aa7be26f3b4d329e61cd127f064570b838b0bba768c984f4de1704570c0c79a31fc40c654d55068
7
+ data.tar.gz: '04894f9d7878931ae4d2adb3e51888de2e66b593638703242a8b819d681d35e608b5540c0f19f9ded9d01ba808d350360e1fd528dcc34e37e0e30abe6e027018'
data/CHANGELOG.md CHANGED
@@ -1,204 +1,173 @@
1
- 1.0.1 2021-04-21
2
- ----------------
1
+ ## 1.1 2021-08-18
3
2
 
4
- * Override inspect method for classes defined in modules (#7)
3
+ - Add automatic `to_proc` method for callable modules
5
4
 
6
- 1.0 2019-10-18
5
+ ## 1.0.1 2021-04-21
6
+
7
+ - Override inspect method for classes defined in modules (#7)
8
+
9
+ ## 1.0 2019-10-18
7
10
  --------------
8
11
 
9
- * Cleanup code
10
- * Obfuscate bootstrap dictionary code in packages
11
- * Move packer, bootstrap, CLI, creator code into stock modules
12
+ - Cleanup code
13
+ - Obfuscate bootstrap dictionary code in packages
14
+ - Move packer, bootstrap, CLI, creator code into stock modules
12
15
 
13
- 0.34 2019-10-14
14
- ---------------
16
+ ## 0.34 2019-10-14
15
17
 
16
- * Improve README
18
+ - Improve README
17
19
 
18
- 0.33 2019-10-02
19
- ---------------
20
+ ## 0.33 2019-10-02
20
21
 
21
- * Add backward compatibility with Ruby 2.4.x
22
- * Add support for creating modules programmatically
23
- * Fix use of tags in import_map, auto_import_map, include_from, extend_from
22
+ - Add backward compatibility with Ruby 2.4.x
23
+ - Add support for creating modules programmatically
24
+ - Fix use of tags in import_map, auto_import_map, include_from, extend_from
24
25
 
25
- 0.32 2019-09-03
26
- ---------------
26
+ ## 0.32 2019-09-03
27
27
 
28
- * Implement export_from_receiver
29
- * Implement additive exports
30
- * Refactor auto_import_map, add not_found option
31
- * Fix backtrace for exports of missing symbols
28
+ - Implement export_from_receiver
29
+ - Implement additive exports
30
+ - Refactor auto_import_map, add not_found option
31
+ - Fix backtrace for exports of missing symbols
32
32
 
33
- 0.31 2019-08-28
34
- ---------------
33
+ ## 0.31 2019-08-28
35
34
 
36
- * Fix error handling when default_export symbol is not found
35
+ - Fix error handling when default_export symbol is not found
37
36
 
38
- 0.30 2019-08-24
39
- ---------------
37
+ ## 0.30 2019-08-24
40
38
 
41
- * Add symbol_keys option to import_map
39
+ - Add symbol_keys option to import_map
42
40
 
43
- 0.29 2019-08-23
44
- ---------------
41
+ ## 0.29 2019-08-23
45
42
 
46
- * Implement auto_import_map
47
- * Add preliminary inline Gemfile to packaged apps
43
+ - Implement auto_import_map
44
+ - Add preliminary inline Gemfile to packaged apps
48
45
 
49
- 0.28 2019-08-23
50
- ---------------
46
+ ## 0.28 2019-08-23
51
47
 
52
- * Implement tagged sources
53
- * Improve application packer
48
+ - Implement tagged sources
49
+ - Improve application packer
54
50
 
55
- 0.27 2019-08-21
56
- ---------------
51
+ ## 0.27 2019-08-21
57
52
 
58
- * Add initial packing functionality
53
+ - Add initial packing functionality
59
54
 
60
- 0.26 2019-08-20
61
- ---------------
55
+ ## 0.26 2019-08-20
62
56
 
63
- * Add Module#alias_method_once for idempotent method aliasing
64
- * Add dependency introspection API
65
- * Add support for hash in `#export`
57
+ - Add Module#alias_method_once for idempotent method aliasing
58
+ - Add dependency introspection API
59
+ - Add support for hash in `#export`
66
60
 
67
- 0.25 2019-06-07
68
- ---------------
61
+ ## 0.25 2019-06-07
69
62
 
70
- * Add `#import_map` method
63
+ - Add `#import_map` method
71
64
 
72
- 0.24 2019-05-22
73
- ---------------
65
+ ## 0.24 2019-05-22
74
66
 
75
- * Fix usage of Modulation in rake tasks
76
- * Fix behavior when referencing missing consts in modules using `#auto_import`
67
+ - Fix usage of Modulation in rake tasks
68
+ - Fix behavior when referencing missing consts in modules using `#auto_import`
77
69
 
78
- 0.23 2019-05-17
79
- ---------------
70
+ ## 0.23 2019-05-17
80
71
 
81
- * Fix regression in `#export_default`
72
+ - Fix regression in `#export_default`
82
73
 
83
- 0.22 2019-05-15
84
- ---------------
74
+ ## 0.22 2019-05-15
85
75
 
86
- * Export_default of a method now exports a proc calling that method
87
- * Raise error on export of undefined symbols
76
+ - Export_default of a method now exports a proc calling that method
77
+ - Raise error on export of undefined symbols
88
78
 
89
- 0.21 2019-02-19
90
- ---------------
79
+ ## 0.21 2019-02-19
91
80
 
92
- * Add support for list of symbols to import in `Kernel#include_from`
81
+ - Add support for list of symbols to import in `Kernel#include_from`
93
82
 
94
- 0.20 2019-01-16
95
- ---------------
83
+ ## 0.20 2019-01-16
96
84
 
97
- * Add import_all method
85
+ - Add import_all method
98
86
 
99
- 0.19 2019-01-05
100
- ---------------
87
+ ## 0.19 2019-01-05
101
88
 
102
- * Move repo to https://github.com/digital-fabric/modulation
89
+ - Move repo to https://github.com/digital-fabric/modulation
103
90
 
104
- 0.18 2018-12-30
105
- ---------------
91
+ ## 0.18 2018-12-30
106
92
 
107
- * Add auto_import feature for lazy loading of modules
93
+ - Add auto_import feature for lazy loading of modules
108
94
 
109
- 0.17 2018-11-22
110
- ---------------
95
+ ## 0.17 2018-11-22
111
96
 
112
- * More documentation
97
+ - More documentation
113
98
 
114
- 0.16 2018-09-24
115
- ---------------
99
+ ## 0.16 2018-09-24
116
100
 
117
- * Add __expose! method for exposing private symbols for testing purposes
101
+ - Add __expose! method for exposing private symbols for testing purposes
118
102
 
119
- 0.15 2018-09-09
120
- ---------------
103
+ ## 0.15 2018-09-09
121
104
 
122
- * Fix include_from to include only exported constants
105
+ - Fix include_from to include only exported constants
123
106
 
124
- 0.14 2018-09-09
125
- ---------------
107
+ ## 0.14 2018-09-09
126
108
 
127
- * Fix include_from, extend_from to add constants to target object
109
+ - Fix include_from, extend_from to add constants to target object
128
110
 
129
- 0.13 2018-09-06
130
- ---------------
111
+ ## 0.13 2018-09-06
131
112
 
132
- * Evaluate module code on singleton_class instead of using `#extend self`
133
- * Fix calling `#include` inside imported module
134
- * Add `rbm` binary for running ruby scripts using `#import`
113
+ - Evaluate module code on singleton_class instead of using `#extend self`
114
+ - Fix calling `#include` inside imported module
115
+ - Add `rbm` binary for running ruby scripts using `#import`
135
116
 
136
- 0.12 2018-08-20
137
- ---------------
117
+ ## 0.12 2018-08-20
138
118
 
139
- * Fix sanitizing of error backtrace
140
- * Fix importing of gems
119
+ - Fix sanitizing of error backtrace
120
+ - Fix importing of gems
141
121
 
142
- 0.11 2018-08-20
143
- ---------------
122
+ ## 0.11 2018-08-20
144
123
 
145
- * Add Modulation.mock for use in testing
124
+ - Add Modulation.mock for use in testing
146
125
 
147
- 0.10 2018-08-19
148
- ---------------
126
+ ## 0.10 2018-08-19
149
127
 
150
- * Refactor and cleanup code
128
+ - Refactor and cleanup code
151
129
 
152
- 0.9.1 2018-08-15
153
- ----------------
130
+ ## 0.9.1 2018-08-15
154
131
 
155
- * Small fixes to README
132
+ - Small fixes to README
156
133
 
157
- 0.9 2018-08-13
158
- --------------
134
+ ## 0.9 2018-08-13
159
135
 
160
- * Add support for module reloading
136
+ - Add support for module reloading
161
137
 
162
- 0.8 2018-08-05
163
- --------------
138
+ ## 0.8 2018-08-05
164
139
 
165
- * Add support for nested namespaces
166
- * Add support for circular dependencies
140
+ - Add support for nested namespaces
141
+ - Add support for circular dependencies
167
142
 
168
- 0.7 2018-07-29
169
- --------------
143
+ ## 0.7 2018-07-29
170
144
 
171
- * Add `MODULE` constant for accessing module from nested namespaces within itself
145
+ - Add `MODULE` constant for accessing module from nested namespaces within itself
172
146
 
173
- 0.6 2018-07-23
174
- --------------
147
+ ## 0.6 2018-07-23
175
148
 
176
- * Add support for using gems as imported modules (experimental feature)
177
- * Add `Modulation.full_trace!` method for getting full backtrace on errors
178
- * Fix `Modulation.transform_export_default_value`
179
- * Change name to *Modulation*
149
+ - Add support for using gems as imported modules (experimental feature)
150
+ - Add `Modulation.full_trace!` method for getting full backtrace on errors
151
+ - Fix `Modulation.transform_export_default_value`
152
+ - Change name to *Modulation*
180
153
 
181
- 0.5.1 2018-07-20
182
- ----------------
154
+ ## 0.5.1 2018-07-20
183
155
 
184
- * Fix `#extend_from`, `#include_from` to work with ruby 2.4
156
+ - Fix `#extend_from`, `#include_from` to work with ruby 2.4
185
157
 
186
- 0.5 2018-07-19
187
- --------------
158
+ ## 0.5 2018-07-19
188
159
 
189
- * Add `#extend_from`, `#include_from` to include imported methods in classes
160
+ - Add `#extend_from`, `#include_from` to include imported methods in classes
190
161
  and modules
191
162
 
192
- 0.4 2018-07-19
193
- --------------
163
+ ## 0.4 2018-07-19
194
164
 
195
- * Refactor code
196
- * Add tests
197
- * Remove namespace feature (owing to the way Ruby handles constants in blocks)
165
+ - Refactor code
166
+ - Add tests
167
+ - Remove namespace feature (owing to the way Ruby handles constants in blocks)
198
168
 
199
- 0.3.3 2018-07-09
200
- ----------------
169
+ ## 0.3.3 2018-07-09
201
170
 
202
- * Switch to explicit exports
203
- * More documentation
204
- * Better error handling
171
+ - Switch to explicit exports
172
+ - More documentation
173
+ - Better error handling
@@ -65,6 +65,12 @@ module Modulation
65
65
  )
66
66
  else
67
67
  Exports.perform_exports(mod)
68
+ if mod.respond_to?(:call) && !mod.respond_to?(:to_proc)
69
+ def mod.to_proc
70
+ method(:call).to_proc
71
+ end
72
+ end
73
+
68
74
  mod
69
75
  end
70
76
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulation
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-21 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.0.8
123
+ rubygems_version: 3.1.6
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: 'Modulation: explicit dependency management for Ruby'