funkr 0.0.28 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7cb4f5366a7c1c68082cb5982e5cd7700440d94344fdfb8cdff7bd94b723bb4a
4
+ data.tar.gz: 4c79978d034dbbc0fc650644808ca3de77efa6e934770a4602d09ea042891c01
5
+ SHA512:
6
+ metadata.gz: e2767fe18dbf634574240a8b40acf5a8d42f2caa0770605a3b9b5e25ff62b9307552088da7a381f9c3a5e5ee3cb2b9dd2a6db93f7d8034b7ad6641d595cc5307
7
+ data.tar.gz: c7110ff660fb041f5f09b63bff32e187c99fccfec855d75d1be99993115f1654255144185140cdd1b47dffc4c78d3a8d2fac0e4d60fe9ab2ab120ef05726c6ed
data/README CHANGED
@@ -10,4 +10,7 @@ categories they belongs to (Array, Hash ...). Categories can also be
10
10
  used with custom types, see provided classes.
11
11
 
12
12
  To get started, we recommand you to read the tests, and get feets wet
13
- with provided Algebraic Data Types (like Maybe).
13
+ with provided Algebraic Data Types (like Maybe).
14
+
15
+ Funkr is heavily used by its authors in production at
16
+ http://www.atikteam.com/en to ensure better code reliability.
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  $:.push File.expand_path("../lib", __FILE__)
3
2
  require "funkr/version"
4
3
 
@@ -37,5 +36,5 @@ EOF
37
36
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
38
37
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
39
38
  s.require_paths = ["lib"]
40
- s.add_development_dependency 'rake', '~> 0.9.2'
39
+ s.add_development_dependency 'rake', '~> 12.3'
41
40
  end
@@ -14,7 +14,7 @@ module Funkr
14
14
  def self.build_matchers(constructs)
15
15
  @constructs = constructs
16
16
  constructs.each do |c|
17
- name, *data = c
17
+ name, *_ = c
18
18
  define_method(name) do |&b|
19
19
  @undefined.delete(name)
20
20
  if @const == name then
@@ -1,4 +1,4 @@
1
- require 'funkr/extensions/fixnum'
1
+ require 'funkr/extensions/integer'
2
2
  require 'funkr/extensions/array'
3
3
  require 'funkr/extensions/enumerable'
4
4
  require 'funkr/extensions/hash'
@@ -1,6 +1,6 @@
1
1
  require "funkr/categories/monoid"
2
2
 
3
- class Fixnum
3
+ class Integer
4
4
 
5
5
  include Funkr::Categories
6
6
 
@@ -10,6 +10,9 @@ class Fixnum
10
10
  def mplus(y)
11
11
  self + y
12
12
  end
13
+
14
+ def self.mzero
15
+ 0
16
+ end
13
17
 
14
18
  end
15
-
@@ -1,3 +1,3 @@
1
1
  module Funkr
2
- VERSION = "0.0.28"
2
+ VERSION = "0.0.30"
3
3
  end
@@ -66,4 +66,9 @@ class TestExtensions < Test::Unit::TestCase
66
66
  a.make_uniq_by{|x,y| x[:v] == y[:v]})
67
67
  end
68
68
 
69
+
70
+ def test_mconcat_integer
71
+ assert_equal(6, Integer.mconcat([1,2,3]))
72
+ end
73
+
69
74
  end
metadata CHANGED
@@ -1,68 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: funkr
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 28
9
- version: 0.0.28
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.30
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Paul Rivier
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2011-12-06 00:00:00 +01:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 9
31
- - 2
32
- version: 0.9.2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '12.3'
33
20
  type: :development
34
- version_requirements: *id001
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '12.3'
35
27
  description: |
36
28
  Funkr is a functionnal toolbox for the Ruby language.
37
-
29
+
38
30
  In particular, it offers a simple mechanism to create Algebraic Data
39
31
  Types and do pattern matching on them.
40
-
32
+
41
33
  -
42
-
34
+
43
35
  It also provide modules for common categories (Monoid, Monad,
44
36
  Functor, Applicative ...), and extends common types to support
45
37
  categories they belongs to (Array, Hash ...). Categories can also be
46
38
  used with custom types, see provided classes.
47
-
39
+
48
40
  -
49
-
41
+
50
42
  Array and Hash classes are extended with methods providing correct
51
43
  behaviour with respect to categories. Enumerable module comes with
52
44
  a lot of useful functions for working with lists and sets. See the
53
45
  module documentation and the test suite for examples.
54
-
55
- email:
46
+ email:
56
47
  - paul (dot) r (dot) ml (at) gmail (dot) com
57
48
  executables: []
58
-
59
49
  extensions: []
60
-
61
50
  extra_rdoc_files: []
62
-
63
- files:
64
- - .gitignore
65
- - .travis.yml
51
+ files:
52
+ - ".gitignore"
53
+ - ".travis.yml"
66
54
  - Gemfile
67
55
  - README
68
56
  - Rakefile
@@ -80,8 +68,8 @@ files:
80
68
  - lib/funkr/extensions.rb
81
69
  - lib/funkr/extensions/array.rb
82
70
  - lib/funkr/extensions/enumerable.rb
83
- - lib/funkr/extensions/fixnum.rb
84
71
  - lib/funkr/extensions/hash.rb
72
+ - lib/funkr/extensions/integer.rb
85
73
  - lib/funkr/types.rb
86
74
  - lib/funkr/types/container.rb
87
75
  - lib/funkr/types/failable.rb
@@ -93,37 +81,27 @@ files:
93
81
  - test/test_hash.rb
94
82
  - test/test_maybe.rb
95
83
  - test/test_simple_records.rb
96
- has_rdoc: true
97
84
  homepage: http://github.com/paul-r-ml/funkr
98
85
  licenses: []
99
-
86
+ metadata: {}
100
87
  post_install_message:
101
88
  rdoc_options: []
102
-
103
- require_paths:
89
+ require_paths:
104
90
  - lib
105
- required_ruby_version: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
108
93
  - - ">="
109
- - !ruby/object:Gem::Version
110
- segments:
111
- - 0
112
- version: "0"
113
- required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
116
98
  - - ">="
117
- - !ruby/object:Gem::Version
118
- segments:
119
- - 0
120
- version: "0"
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
121
101
  requirements: []
122
-
123
102
  rubyforge_project: funkr
124
- rubygems_version: 1.3.7
103
+ rubygems_version: 2.7.6.2
125
104
  signing_key:
126
- specification_version: 3
105
+ specification_version: 4
127
106
  summary: Functionnal toolbox for Ruby
128
107
  test_files: []
129
-