notation 0.1.0 → 0.1.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f71600bdd1d1131f1e23cf9c553b845326e8a5c5
4
+ data.tar.gz: 5475de1bc916ca9fba2bd61d8298a94f46d51eef
5
+ SHA512:
6
+ metadata.gz: e6e8659943cb09e3c87b5b5008d80306f0b6d0240bd385151d510471d554986468034589ca9f6fa6a8d296d773e6e82cd96f2416f5f5f4f00a1ad9b5eca77b4f
7
+ data.tar.gz: 021fcbcd4c87cfa510c6c087b7787065076363152fdfd34fd0e7f80b474e9390471ae55f27cc7977ed5158d194b4e6a93a858a41f338c3b0efa133cdb2e01368
data/CHANGES CHANGED
@@ -1,2 +1,6 @@
1
+ = 0.1.1 - 9-Oct-2014
2
+ * Updated gem:create and gem:install tasks.
3
+ * Updated gemspec to include license, current home page.
4
+
1
5
  = 0.1.0 - 13-Dec-2009
2
6
  * Initial release
data/README CHANGED
@@ -5,7 +5,7 @@
5
5
  gem install notation
6
6
 
7
7
  = Synopsis
8
- # Run with -Ku
8
+ # Run with -Ku if using Ruby 1.8.
9
9
  require 'notation'
10
10
 
11
11
  λ { puts "hello" } # => "Hello"
@@ -16,6 +16,17 @@
16
16
  This library was inspired by the programming language Fortress, an offshoot
17
17
  of Fortran, created by Sun. Fortress supports unicode operators baked into
18
18
  the language.
19
+
20
+ = Restrictions
21
+ The ability to add unicode methods is limited to method names that have
22
+ no receiver. This is a limitation of the Ruby parser.
23
+
24
+ = Copyright
25
+ (C) 2009-2014 Daniel J. Berger
26
+ All Rights Reserved
27
+
28
+ = License
29
+ Artistic 2.0
19
30
 
20
31
  = Author
21
32
  Daniel Berger
data/Rakefile CHANGED
@@ -1,26 +1,33 @@
1
1
  require 'rake'
2
+ require 'rake/clean'
2
3
  require 'rake/testtask'
3
- include Config
4
4
 
5
- desc "Install the notation library"
6
- task :install_lib do
7
- cp 'lib/notation.rb', CONFIG['sitelibdir'], :verbose => true
8
- end
5
+ CLEAN.include("**/*.gem", "**/*.rbc")
9
6
 
10
- desc 'Build the notation gem'
11
- task :gem do
12
- spec = eval(IO.read('notation.gemspec'))
13
- Gem::Builder.new(spec).build
14
- end
7
+ namespace :gem do
8
+ desc 'Build the notation gem'
9
+ task :create => [:clean] do
10
+ spec = eval(IO.read('notation.gemspec'))
11
+ if Gem::VERSION.to_f < 2.0
12
+ Gem::Builder.new(spec).build
13
+ else
14
+ require 'rubygems/package'
15
+ Gem::Package.build(spec)
16
+ end
17
+ end
15
18
 
16
- desc 'Install the notation library as a gem'
17
- task :install_gem => [:gem] do
18
- file = Dir["*.gem"].first
19
- sh "gem install #{file}"
19
+ desc 'Install the notation library as a gem'
20
+ task :install => [:create] do
21
+ file = Dir["*.gem"].first
22
+ sh "gem install -l #{file}"
23
+ end
20
24
  end
21
25
 
22
26
  Rake::TestTask.new do |t|
27
+ task :test => :clean
23
28
  t.warning = true
24
29
  t.verbose = true
25
- t.ruby_opts << '-Ku'
30
+ t.ruby_opts << '-Ku' if RUBY_VERSION.to_f < 1.9
26
31
  end
32
+
33
+ task :default => :test
@@ -1,16 +1,18 @@
1
- # Run with -Ku
1
+ # encoding: utf-8
2
+
3
+ # Run with -Ku if using Ruby 1.8.
2
4
 
3
5
  module Kernel
4
6
  # Version of the notation library
5
- NOTATION_VERSION = '0.1.0'
7
+ NOTATION_VERSION = '0.1.1'
6
8
 
7
9
  # Make lambda a true lambda
8
10
  #
9
11
  # Example:
10
12
  # λ { puts 'Hello' }.call => 'Hello'
11
- #
13
+ #
12
14
  alias λ proc
13
-
15
+
14
16
  # Sigma, i.e. the sum of all elements.
15
17
  #
16
18
  # Example:
@@ -21,12 +23,12 @@ module Kernel
21
23
  args.each{ |e| sum += e }
22
24
  sum
23
25
  end
24
-
26
+
25
27
  # Square root
26
28
  #
27
29
  # Example:
28
30
  # √ 49 => 7.0
29
- #
31
+ #
30
32
  def √(root)
31
33
  Math.sqrt(root)
32
34
  end
@@ -2,17 +2,17 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'notation'
5
- gem.version = '0.1.0'
5
+ gem.version = '0.1.1'
6
6
  gem.author = 'Daniel J. Berger'
7
7
  gem.email = 'djberg96@gmail.com'
8
- gem.homepage = 'http://www.rubyforge.org/projects/shards'
8
+ gem.license = 'Artistic 2.0'
9
+ gem.homepage = 'https://github.com/djberg96/notation'
9
10
  gem.summary = 'Unicode symbols that can be used as methods.'
10
11
  gem.test_file = 'test/test_notation.rb'
11
- gem.has_rdoc = true
12
12
  gem.files = Dir['**/*'].delete_if{ |item| item.include?('git') }
13
13
 
14
14
  gem.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST']
15
- gem.rubyforge_project = 'shards'
15
+ gem.add_development_dependency('rake')
16
16
 
17
17
  gem.description = <<-EOF
18
18
  The notation library provides unicode symbols that you can use as
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  #######################################################################
2
3
  # test_notation.rb
3
4
  #
@@ -9,19 +10,19 @@ require 'notation'
9
10
 
10
11
  class TC_Notation < Test::Unit::TestCase
11
12
  def test_version
12
- assert_equal('0.1.0', NOTATION_VERSION)
13
+ assert_equal('0.1.1', NOTATION_VERSION)
13
14
  end
14
15
 
15
16
  def test_sigma
16
17
  assert_respond_to(Kernel, :∑)
17
18
  assert_equal(6, ∑(1,2,3))
18
19
  end
19
-
20
+
20
21
  def test_square_root
21
22
  assert_respond_to(Kernel, :√)
22
23
  assert_equal(7.0, √(49))
23
24
  end
24
-
25
+
25
26
  def test_lambda
26
27
  assert_equal('hello', λ { 'hello' }.call)
27
28
  end
metadata CHANGED
@@ -1,63 +1,70 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: notation
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2009-12-13 00:00:00 -07:00
13
- default_executable:
14
- dependencies: []
15
-
16
- description: " The notation library provides unicode symbols that you can use as\n methods instead of using standard method names.\n"
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: |2
28
+ The notation library provides unicode symbols that you can use as
29
+ methods instead of using standard method names.
17
30
  email: djberg96@gmail.com
18
31
  executables: []
19
-
20
32
  extensions: []
21
-
22
- extra_rdoc_files:
33
+ extra_rdoc_files:
23
34
  - CHANGES
24
35
  - README
25
36
  - MANIFEST
26
- files:
37
+ files:
27
38
  - CHANGES
28
- - lib/notation.rb
29
39
  - MANIFEST
30
- - notation.gemspec
31
- - Rakefile
32
40
  - README
41
+ - Rakefile
42
+ - lib/notation.rb
43
+ - notation.gemspec
33
44
  - test/test_notation.rb
34
- has_rdoc: true
35
- homepage: http://www.rubyforge.org/projects/shards
36
- licenses: []
37
-
45
+ homepage: https://github.com/djberg96/notation
46
+ licenses:
47
+ - Artistic 2.0
48
+ metadata: {}
38
49
  post_install_message:
39
50
  rdoc_options: []
40
-
41
- require_paths:
51
+ require_paths:
42
52
  - lib
43
- required_ruby_version: !ruby/object:Gem::Requirement
44
- requirements:
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
45
55
  - - ">="
46
- - !ruby/object:Gem::Version
47
- version: "0"
48
- version:
49
- required_rubygems_version: !ruby/object:Gem::Requirement
50
- requirements:
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
51
60
  - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
54
- version:
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
55
63
  requirements: []
56
-
57
- rubyforge_project: shards
58
- rubygems_version: 1.3.5
64
+ rubyforge_project:
65
+ rubygems_version: 2.4.1
59
66
  signing_key:
60
- specification_version: 3
67
+ specification_version: 4
61
68
  summary: Unicode symbols that can be used as methods.
62
- test_files:
69
+ test_files:
63
70
  - test/test_notation.rb