pixee-procs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9dfb756bd97cabbc2d2685b34dbf645654eeea50aa0a7b3b20ea7338f0ef4f52
4
+ data.tar.gz: bb629130eb783929093713842ad3281082abad6f27ddbc4e14f757c2c3a27400
5
+ SHA512:
6
+ metadata.gz: fcd761ed57a5450c0b598db4718be92d32cc59027d3f30598e46712a5db93f78af3a0c6b6b8c267a373d5716d1cb8cb6c4c1f1845dd379afc09d963cdc427942
7
+ data.tar.gz: c6d779da3938fe9fa65e9ed22151986900c4502410dae52be07518a96aec0140bba6cd21ccf9aace1132d33c7c95a86e924b89b5a73eff138038bed7ca8a56b1
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Pixee::Procs
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pixee/procs`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'pixee-procs'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install pixee-procs
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pixee-procs.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,10 @@
1
+ require 'pixee/procs/version'
2
+ require 'pixee/procs/proc_extension'
3
+
4
+ # No needs for the NS yet
5
+ # Currently just extending Proc
6
+ # module Pixee
7
+ # module Procs
8
+ # # Your code goes here...
9
+ # end
10
+ # end
@@ -0,0 +1,35 @@
1
+ # Adding methods for easily chaining together procs
2
+ class Proc
3
+ # Pipes the result of the current proc into the next proc
4
+ def >>(next_proc)
5
+ ->(*args) {
6
+ result = self.call(*args)
7
+ next_proc.call(result)
8
+ }
9
+ end
10
+
11
+ # Acts as a "map" function for the results of the current proc
12
+ def *(next_proc)
13
+ ->(*args) {
14
+ result = self.call(*args)
15
+ result.map {|r| next_proc.call(r)}
16
+ }
17
+ end
18
+
19
+ # Prepare the current proc with any additional arguments that should
20
+ # be passed during its creation.
21
+ # You do not need to prepare if your proc takes no arguments aside
22
+ # from the output of the prior proc
23
+ def prepare(*args)
24
+ ->(*proc_args) {
25
+ proc_args += args
26
+ self.call(*proc_args)
27
+ }
28
+ end
29
+
30
+ # prep to save a few characters
31
+ alias_method :prep, :prepare
32
+ # pix since maybe a nonsense word is easier to avoid overlap
33
+ # with other concepts
34
+ alias_method :pix, :prepare
35
+ end
@@ -0,0 +1,5 @@
1
+ module Pixee
2
+ module Procs
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pixee-procs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Justin Spencer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description: Helper lib that adds some useful feature to procs
56
+ email:
57
+ - jspencer.jms@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - README.md
63
+ - Rakefile
64
+ - lib/pixee/procs.rb
65
+ - lib/pixee/procs/proc_extension.rb
66
+ - lib/pixee/procs/version.rb
67
+ homepage: https://github.com/JAMSUPREME/pixee-procs
68
+ licenses:
69
+ - MIT
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubyforge_project:
87
+ rubygems_version: 2.7.7
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Helper lib that adds some useful feature to procs
91
+ test_files: []