c80_news 0.1.0.13 → 0.1.0.14
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.
- checksums.yaml +4 -4
- data/README.md +22 -29
- data/app/views/shared/_news_block.html.erb +17 -22
- data/c80_news.gemspec +4 -4
- data/db/seeds/c80_news_01_fill_props.rb +12 -12
- data/lib/c80_news/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b49821c617380dba546bf7ec724581695da4bc94
|
4
|
+
data.tar.gz: e08dc54b99d63f4cd4616c4a591e00760bdf64c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd2598f228122ec05d37af050b8b1eb22decb77e2ce64aee3ee5df94f6d521d16f2d05fab3f039582ae5da1bb164533c1ecbebc1bc78ca495615334306d3089d
|
7
|
+
data.tar.gz: 4c7dd9183f80f2f3cc9b120dfbc235a4259859900575a1925f65f7428059da7bc8c354c0e9bfa93e4c1a420c0d36c298cfb68e7727c3cf65176ae4ada4d253d7
|
data/README.md
CHANGED
@@ -12,43 +12,51 @@ gem 'c80_news'
|
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
$ gem install c80_news
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
20
18
|
|
21
19
|
## Usage
|
22
20
|
|
23
21
|
1) `rake db:migrate`
|
24
22
|
2) `vi db/seed/07_fill_news_props.rb`:
|
25
23
|
|
26
|
-
```
|
24
|
+
```ruby
|
27
25
|
# rake db:seed:07_fill_news_props
|
28
26
|
|
29
27
|
C80News::Prop.delete_all
|
30
28
|
C80News::Prop.create!({ per_page:8, per_widget:4 })
|
31
29
|
```
|
30
|
+
|
32
31
|
3) `rake db:seed:07_fill_news_props`
|
33
|
-
|
34
|
-
|
32
|
+
|
33
|
+
4) Add the line to application's routes file:
|
34
|
+
|
35
|
+
```ruby
|
35
36
|
mount C80News::Engine => '/'
|
36
37
|
```
|
38
|
+
|
37
39
|
5) Add this line to `application.js.coffee`:
|
38
|
-
|
40
|
+
|
41
|
+
```coffee
|
39
42
|
#= require c80_news
|
40
43
|
```
|
44
|
+
|
41
45
|
6) Add this line to `application.scss`:
|
42
|
-
|
46
|
+
|
47
|
+
```scss
|
43
48
|
@import "c80_news";
|
44
49
|
```
|
50
|
+
|
45
51
|
7) Add this line to `application_controller.rb`:
|
46
|
-
|
52
|
+
|
53
|
+
```ruby
|
47
54
|
helper C80News::Engine.helpers
|
48
55
|
```
|
49
56
|
|
50
57
|
20161009:
|
51
|
-
|
58
|
+
|
59
|
+
```bash
|
52
60
|
scout@scout-VirtualBox:~/git/bitbucket
|
53
61
|
$ grep c80_news . -r --include=Gemfile
|
54
62
|
./vape_store/Gemfile:gem 'c80_news'#, '0.1.0.4', :github => 'c80_news/c80_news', :branch => 'master'
|
@@ -59,27 +67,12 @@ $ grep c80_news . -r --include=Gemfile
|
|
59
67
|
./patron/Gemfile:gem 'c80_news'#, '0.1.0.4', :github => 'c80_news/c80_news', :branch => 'master'
|
60
68
|
```
|
61
69
|
|
62
|
-
|
63
70
|
## Available helper methods
|
64
71
|
|
65
|
-
```
|
72
|
+
```ruby
|
66
73
|
render_news_block
|
67
74
|
render_one_fact
|
68
75
|
|
69
76
|
render_news_block(false, params[:page], {:partial_name => 'fact_inverted', :thumb_size => 'thumb_preview', :css_class_news_block => 'style_photostudio'})
|
70
77
|
render_news_block(true, params[:page], {:partial_name => 'fact_inverted', :thumb_size => 'thumb_md', :css_class_news_block => 'style_photostudio'})
|
71
|
-
```
|
72
|
-
|
73
|
-
## Development
|
74
|
-
|
75
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
76
|
-
|
77
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
78
|
-
|
79
|
-
## Contributing
|
80
|
-
|
81
|
-
1. Fork it ( https://github.com/[my-github-username]/c80_news/fork )
|
82
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
83
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
84
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
85
|
-
5. Create a new Pull Request
|
78
|
+
```
|
@@ -1,23 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
:thumb_size => thumb_size
|
19
|
-
}
|
20
|
-
%>
|
21
|
-
</div>
|
22
|
-
|
1
|
+
<% if h3_title.present? %>
|
2
|
+
<h3 class="section_title h3_for_news_block"><%= h3_title %></h3>
|
3
|
+
<% end %>
|
4
|
+
<div class="ajax_div news_block <%= css_class_news_block %>"
|
5
|
+
data-partial_name="<%= partial_name %>"
|
6
|
+
data-css_class_news_block="<%= css_class_news_block %>"
|
7
|
+
data-is_render_paginator="<%= is_render_paginator %>">
|
8
|
+
<%= render :partial => "shared/news_list",
|
9
|
+
:locals => {
|
10
|
+
:news_list => news_list,
|
11
|
+
:is_news_page => is_news_page,
|
12
|
+
:per_row => per_block_row,
|
13
|
+
:partial_name => partial_name,
|
14
|
+
:is_render_paginator => is_render_paginator,
|
15
|
+
:thumb_size => thumb_size
|
16
|
+
}
|
17
|
+
%>
|
23
18
|
</div>
|
data/c80_news.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler"
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
-
spec.add_dependency 'activesupport'
|
25
|
-
spec.add_dependency "rails"
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_dependency 'activesupport'
|
25
|
+
spec.add_dependency "rails"
|
26
26
|
spec.add_dependency "local_time"
|
27
27
|
spec.add_dependency "c80_lazy_images"
|
28
28
|
end
|
@@ -2,18 +2,18 @@
|
|
2
2
|
|
3
3
|
C80News::Prop.delete_all
|
4
4
|
C80News::Prop.create!({
|
5
|
-
|
6
|
-
|
5
|
+
thumb_lg_width: 640,
|
6
|
+
thumb_lg_height: 400,
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
thumb_md_width: 320,
|
9
|
+
thumb_md_height: 200,
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
per_widget: 3,
|
15
|
-
per_page: 6,
|
16
|
-
preview_width: 250,
|
17
|
-
preview_height: 164
|
11
|
+
thumb_sm_width: 80,
|
12
|
+
thumb_sm_height: 50,
|
18
13
|
|
19
|
-
|
14
|
+
per_widget: 3,
|
15
|
+
per_page: 6,
|
16
|
+
thumb_preview_width: 250,
|
17
|
+
thumb_preview_height: 164
|
18
|
+
|
19
|
+
})
|
data/lib/c80_news/version.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_news
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
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
|
-
version: '
|
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
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: local_time
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.6.11
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: News gem
|