tweet_validator 0.0.1.beta2 → 0.0.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
  SHA1:
3
- metadata.gz: 5241377ce8d8c173de0aebc7645874d71a50e674
4
- data.tar.gz: c81d248a1cb52f354f6439e590cd8584fa06e082
3
+ metadata.gz: 793588e80427f715a7817bc49999ce10d962504a
4
+ data.tar.gz: d11e59328d7a39ec793ed99b08e41b3581c22996
5
5
  SHA512:
6
- metadata.gz: 83e56268a7442893cf796ce731ac85b94960b0c1f31721bcada22dd6ec8cfa41a9679e489dc1ef74a94e0769c83d9ee873ff3dd43dbac5e8559809cffeac0e52
7
- data.tar.gz: 0972ea75aa958871e9b6022f3b766632c19bfa817149fbdc2dd27face17ca570601f76ca4e795dad80f7ee0c2c0208d85de3043a48d331fa7c4a968541e92157
6
+ metadata.gz: 464178eba9468210e647d43e6d7ec0a550143b23ec95ace0f7f3774367b59625ebf1b67190ab22c2a5c6bfa8e8eb21573a6369e22996c022b11709958f456075
7
+ data.tar.gz: dae0fb0131cad2153c11b781228ee51fdbb39357bab3790bdae1956942b78fe192d897170bd4695a6ac251c2b6fe185eda5e6472293e7d22b6ba11e920041133
data/README.md CHANGED
@@ -26,7 +26,47 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- TODO: Write usage instructions here
29
+ ```ruby
30
+ class Tweet < ActiveRecord::Base
31
+ validates :message, tweet_length: true
32
+ end
33
+ ```
34
+
35
+ ### Not Rails
36
+
37
+ include `TweetValidator` manually
38
+
39
+ ```ruby
40
+ class Tweet < ActiveRecord::Base
41
+ include TweetValidator
42
+
43
+ validates :message, tweet_length: true
44
+ end
45
+ ```
46
+
47
+ ## Specification
48
+ calculate the length excluding `%<〜>` and `%{〜}`
49
+
50
+ ### Example
51
+ ```ruby
52
+ tweet.message = "a" * 140
53
+ tweet.valid?
54
+ # => true
55
+
56
+ tweet.message = "a" * 141
57
+ tweet.valid?
58
+ # => false
59
+
60
+ tweet.message = "a" * 140 + "%{screen_name}"
61
+ tweet.valid?
62
+ # => true
63
+ ```
64
+
65
+ ## Changelog
66
+ [full changelog](https://github.com/sue445/tweet_validatorcompare/0.0.1...master)
67
+
68
+ ### 0.0.1
69
+ * first release
30
70
 
31
71
  ## Contributing
32
72
 
@@ -1,3 +1,3 @@
1
1
  module TweetValidator
2
- VERSION = "0.0.1.beta2"
2
+ VERSION = "0.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweet_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta2
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sueyoshi_go
@@ -160,9 +160,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">"
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: 1.3.1
165
+ version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
168
  rubygems_version: 2.2.2