motion-support 0.3.0 → 1.0.0

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: d6bd52ad26c40a4b8f4a38e2e1f1dd86cb30b5a4
4
- data.tar.gz: 278c0956ae07db17b8ac6cd905a85c98ecdd497f
3
+ metadata.gz: 5b7dcb39d715784b27bfe53021adf4a192003479
4
+ data.tar.gz: 0655255905f40aa2365bde28c12fd6f35e989e58
5
5
  SHA512:
6
- metadata.gz: da57f98259563e1bcc7d3f1966a096149565f39ecd2dea875c3a8172334b9ddd84b6c82ded42a5837ebd435d4290b5c60384433b50249c2c6e1959336427649e
7
- data.tar.gz: 76836035e618fc9cc54840e5313a1f763cf32aa861b54699d2b993120b692a0b35d4c88664dc384aa34b664b3cde045ec4ff5dc2c3fa9ca2e6135d02a6d7d421
6
+ metadata.gz: e75ec3e05aff72a5892b0789da5dc6a639f72fb8867c421bcaacce6e35876c5c80dc025d6b79b874f1a4d1fc289fc6e6da222c7bbbca8c21f8db4afbb26e8b53
7
+ data.tar.gz: ca524188bc00a0b8f0617e7a2e18abed2600f3bbd77035a1e196dff74bb8b6e0d74656cc2cd5338bd4a447f7bac0842b7e5e9620443605f7dfb12bb2f7678c51
@@ -9,6 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.homepage = "https://github.com/tkadauke/motion-support"
10
10
  s.summary = "Commonly useful extensions to the standard library for RubyMotion"
11
11
  s.description = "Commonly useful extensions to the standard library for RubyMotion. Ported from ActiveSupport."
12
+ s.licenses = ["MIT"]
12
13
 
13
14
  s.files = `git ls-files`.split($\)
14
15
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -78,6 +78,6 @@ end
78
78
 
79
79
  class BigDecimal
80
80
  def duplicable?
81
- true
81
+ false
82
82
  end
83
83
  end
@@ -1,3 +1,3 @@
1
1
  module MotionSupport
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -1,28 +1,28 @@
1
1
  describe "duplicable?" do
2
2
  before do
3
- @raise_dup = [nil, false, true, :symbol, 1, 2.3, 5.seconds]
4
- @yes = ['1', Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new('4.56')]
3
+ @raise_dup = [nil, false, true, :symbol, 1, 2.3, 5.seconds, BigDecimal.new('4.56')]
4
+ @yes = ['1', Object.new, /foo/, [], {}, Time.now, Class.new, Module.new]
5
5
  @no = []
6
6
  end
7
-
7
+
8
8
  it "should return false for non-duplicable objects" do
9
9
  (@raise_dup + @no).each do |v|
10
10
  v.should.not.be.duplicable
11
11
  end
12
12
  end
13
-
13
+
14
14
  it "should return true for duplicable objects" do
15
15
  @yes.each do |v|
16
16
  v.should.be.duplicable
17
17
  end
18
18
  end
19
-
19
+
20
20
  it "should not raise when dupping duplicable objects" do
21
21
  (@yes + @no).each do |v|
22
22
  lambda { v.dup }.should.not.raise
23
23
  end
24
24
  end
25
-
25
+
26
26
  it "should raise when dupping non-duplicable objects" do
27
27
  @raise_dup.each do |v|
28
28
  lambda { v.dup }.should.raise TypeError
@@ -2,11 +2,11 @@ describe "String" do
2
2
  describe "filters" do
3
3
  describe "squish" do
4
4
  before do
5
- @original = %{\u180E\u180E A string surrounded by unicode mongolian vowel separators,
6
- with tabs(\t\t), newlines(\n\n), unicode nextlines(\u0085\u0085) and many spaces( ). \u180E\u180E}
5
+ @original = %{ A string surrounded by spaces, with tabs(\t\t),
6
+ newlines(\n\n), unicode nextlines(\u0085\u0085) and many spaces( ). }
7
7
 
8
- @expected = "A string surrounded by unicode mongolian vowel separators, " +
9
- "with tabs( ), newlines( ), unicode nextlines( ) and many spaces( )."
8
+ @expected = "A string surrounded by spaces, with tabs( ), newlines( )," \
9
+ " unicode nextlines( ) and many spaces( )."
10
10
  end
11
11
 
12
12
  it "should squish string" do
@@ -4,45 +4,44 @@ describe "Time" do
4
4
  before do
5
5
  @time = Time.utc(2005, 2, 21, 17, 44, 30.12345678901)
6
6
  end
7
-
7
+
8
8
  it "should use default conversion if no parameter is given" do
9
9
  @time.to_s.should == @time.to_default_s
10
10
  end
11
-
11
+
12
12
  it "should use default conversion if parameter is unknown" do
13
13
  @time.to_s(:doesnt_exist).should == @time.to_default_s
14
14
  end
15
-
15
+
16
16
  it "should convert to db format" do
17
17
  @time.to_s(:db).should == "2005-02-21 17:44:30"
18
18
  end
19
-
19
+
20
20
  it "should convert to short format" do
21
21
  @time.to_s(:short).should == "21 Feb 17:44"
22
22
  end
23
-
23
+
24
24
  it "should convert to time format" do
25
25
  @time.to_s(:time).should == "17:44"
26
26
  end
27
-
27
+
28
28
  it "should convert to number format" do
29
29
  @time.to_s(:number).should == "20050221174430"
30
30
  end
31
-
31
+
32
32
  it "should convert to nsec format" do
33
- @time.to_s(:nsec).should == "20050221174430123451232"
34
- # Hmm. Looks like RubyMotion has an issue with nanosecs in string time formatting. It should actually be "20050221174430123456789"
33
+ @time.to_s(:nsec).should == "20050221174430123456789"
35
34
  end
36
-
35
+
37
36
  it "should convert to long format" do
38
37
  @time.to_s(:long).should == "February 21, 2005 17:44"
39
38
  end
40
-
39
+
41
40
  it "should convert to long_ordinal format" do
42
41
  @time.to_s(:long_ordinal).should == "February 21st, 2005 17:44"
43
42
  end
44
43
  end
45
-
44
+
46
45
  describe "custom date format" do
47
46
  it "should convert to custom format" do
48
47
  Time::DATE_FORMATS[:custom] = '%Y%m%d%H%M%S'
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Kadauke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-require
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.0.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.0.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Commonly useful extensions to the standard library for RubyMotion. Ported
@@ -46,9 +46,9 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - .gitignore
50
- - .travis.yml
51
- - .yardopts
49
+ - ".gitignore"
50
+ - ".travis.yml"
51
+ - ".yardopts"
52
52
  - Gemfile
53
53
  - HACKS.md
54
54
  - LICENSE
@@ -230,7 +230,8 @@ files:
230
230
  - spec/motion-support/ns_string_spec.rb
231
231
  - spec/motion-support/number_helper_spec.rb
232
232
  homepage: https://github.com/tkadauke/motion-support
233
- licenses: []
233
+ licenses:
234
+ - MIT
234
235
  metadata: {}
235
236
  post_install_message:
236
237
  rdoc_options: []
@@ -238,17 +239,17 @@ require_paths:
238
239
  - lib
239
240
  required_ruby_version: !ruby/object:Gem::Requirement
240
241
  requirements:
241
- - - '>='
242
+ - - ">="
242
243
  - !ruby/object:Gem::Version
243
244
  version: '0'
244
245
  required_rubygems_version: !ruby/object:Gem::Requirement
245
246
  requirements:
246
- - - '>='
247
+ - - ">="
247
248
  - !ruby/object:Gem::Version
248
249
  version: '0'
249
250
  requirements: []
250
251
  rubyforge_project:
251
- rubygems_version: 2.0.14
252
+ rubygems_version: 2.4.5.1
252
253
  signing_key:
253
254
  specification_version: 4
254
255
  summary: Commonly useful extensions to the standard library for RubyMotion