see_more 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmYyOGI1NTk1OGYxYTgxOGU1YzgwNjI0NGY2ZTJkNzkwOTJmZWJlNQ==
4
+ ZjlhMWExNTg0NGEwNzI4MWQ0ZmQzMjVlZjhlZTBjNzI4ZGI4NjY0MQ==
5
5
  data.tar.gz: !binary |-
6
- NGM5MGE4M2IxYTQyOGE4OGFmYzZhZjM5NTJmYmMyMWE4ZWRkMjA2Mg==
6
+ YWVjNDI0NmJmOTIyN2JiOWY2NzY3OTQwZTI0M2M2OWI0NTRlYzY3NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzA5Y2QwNDAxMWExODM4ODg1NjE1NTk1MGE3N2I2NjhmYTEwZjhhYjA2Njk5
10
- ZTVjYzU1MDU3MGY1MGQ2ZGVmZTAwMmEzMzZkNWMyYzFkMGNhZmI1MDY5MTdl
11
- ZTlmYTU3NzE0MzQzMzg2Mjk5ZmE1NTM0NTNkNGY0YzAxMzkzYTM=
9
+ Y2UwMDQxNTUxZGZjZWI0NDYwMDE4NzM2MWQ0MjM4MzJjNDE0ODM4MzQ4MjFh
10
+ Njc1OGU2MjYwYzY3N2ZlNDM5YTJiMTk3YjMyY2FhOWY4NGU1M2JlOGNmMjVi
11
+ NjUyZWE3MTRjOTNlNmE1Y2Y2NGI1ZWI2ZDFmZjQxM2NjOTQwMTg=
12
12
  data.tar.gz: !binary |-
13
- OWFmOTAxYzkzYTk0NWQxOTBjYTNiYTIwY2Y4ZDVjMmI5YTlhZDdlZGYwZmU2
14
- ZjlkZTFiNTgyMDJmN2UyODc1ZGZlOGE3Y2I3MWJjZGI1N2RiNmZhNGY3YTRl
15
- OTg3MjkxOWE5OThiZWEwY2YwZjVkMDBlMGJkYTZmZWVhNWFiNTA=
13
+ YWJkMTA3Njk1MTI4MWFiOTM1OTlmYjhiZTUyYTJkOTkzZGFiYmI5YzE3ZjUw
14
+ OWU3MzA4MWExZjUyYzM4ODAyNzk1NzljYzdhMGNkMjM3YWE0MDZmMDliYWZj
15
+ NTQ5YmUxMWMyMGQ4ZWE1MjgwZjY3MTEyYzJhNjZhYWMzN2RjM2I=
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # SeeMore
2
2
 
3
- TODO: Write a gem description
3
+ **see_more** gem is pretty straight forward in truncating and displaying any large text in a small space with a "see more" link in the end. If clicked, this link shows the entire text and the "see more" link automatically toggles to "see less" link. That's all.
4
+
5
+ Also, this assumes that the server has standard defined REST methods.
4
6
 
5
7
  ## Installation
6
8
 
@@ -18,7 +20,32 @@ Or install it yourself as:
18
20
 
19
21
  ## Usage
20
22
 
21
- TODO: Write usage instructions here
23
+ To display the description of a product with see_more, you would do this.
24
+
25
+ In your application.js,
26
+
27
+ //= require see_more
28
+
29
+ In your view(ideally show.html.erb)
30
+
31
+ <%= see_more @product,:desc, {db: true,link_classes: "clickable",classes: "light",content_size: 30} %>
32
+
33
+ ###see_more
34
+
35
+ Params:
36
+
37
+ - **object** (Mandatory): The Object parameter represents the object itself(the active record object).
38
+ - **field** (Mandatory): The field (passed as symbol) is the attribute of the Object you are going to display as large text.
39
+
40
+
41
+ Options:
42
+
43
+ - **:classes** Displaying of text is inside a span with a class="see_more_span". You can add more classes through this option.
44
+ - **:link_classes**: You can add more classes to the "see more" link.
45
+ - **:content_size**: The number of characters to be displayed intially with the "see more" link.
46
+ - **:db**: Value can either be "true" or "false". If its true, only when you click on the link, the entire text is fetched from the db, if its false, even before clicking on the link, the entire text is rendered, it just hides/unhides the content.
47
+ - **:path**: If you want to visit a custom link, instead of a REST method, pass the url in this option.
48
+
22
49
 
23
50
  ## Contributing
24
51
 
@@ -1,3 +1,3 @@
1
1
  module SeeMore
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
data/see_more.gemspec CHANGED
@@ -19,4 +19,6 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency "rails", ">= 3.1"
21
21
  gem.add_dependency "jquery-rails"
22
+
23
+ gem.add_development_dependency "rspec"
22
24
  end
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+ describe SeeMore do
3
+ pending "write it"
4
+ end
@@ -0,0 +1,8 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'see_more'
5
+
6
+ RSpec.configure do |config|
7
+ # some (optional) config here
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: see_more
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - beck03076
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: ! ' This is Toggleable '
42
56
  email:
43
57
  - senthilkumar.hce@gmail.com
@@ -56,6 +70,8 @@ files:
56
70
  - lib/see_more/helper.rb
57
71
  - lib/see_more/version.rb
58
72
  - see_more.gemspec
73
+ - spec/see_more_spec.rb
74
+ - spec/spec_helper.rb
59
75
  homepage: ''
60
76
  licenses: []
61
77
  metadata: {}
@@ -79,5 +95,7 @@ rubygems_version: 2.2.2
79
95
  signing_key:
80
96
  specification_version: 4
81
97
  summary: See more
82
- test_files: []
98
+ test_files:
99
+ - spec/see_more_spec.rb
100
+ - spec/spec_helper.rb
83
101
  has_rdoc: