tramway-news 0.1.0 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +5 -5
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +12 -19
  4. data/Rakefile +34 -4
  5. data/app/assets/config/tramway_news_manifest.js +2 -0
  6. data/app/assets/javascripts/tramway/news/application.js +13 -0
  7. data/app/assets/stylesheets/tramway/news/application.sass +1 -0
  8. data/app/controllers/tramway/news/application_controller.rb +7 -0
  9. data/app/controllers/tramway/news/news_controller.rb +8 -0
  10. data/app/decorators/tramway/landing/cards/news_decorator.rb +13 -0
  11. data/app/decorators/tramway/news/news_decorator.rb +11 -0
  12. data/app/decorators/tramway/news/user_decorator.rb +5 -0
  13. data/app/forms/tramway/news/news_form.rb +11 -0
  14. data/app/helpers/tramway/news/application_helper.rb +13 -0
  15. data/app/jobs/tramway/news/application_job.rb +6 -0
  16. data/app/mailers/tramway/news/application_mailer.rb +8 -0
  17. data/app/models/tramway/news/application_record.rb +7 -0
  18. data/app/models/tramway/news/news.rb +7 -0
  19. data/app/views/tramway/landing/blocks/block_types/_news.html.haml +1 -0
  20. data/app/views/tramway/news/news/show.html.haml +20 -0
  21. data/config/initializers/tramway.rb +1 -0
  22. data/config/locales/models.yml +8 -0
  23. data/config/routes.rb +3 -0
  24. data/lib/tasks/tramway/news_tasks.rake +4 -0
  25. data/lib/tramway/news/engine.rb +7 -0
  26. data/lib/tramway/news/generators/install_generator.rb +8 -3
  27. data/lib/tramway/news/generators/templates/create_tramway_news_news.rb +13 -0
  28. data/lib/tramway/news/version.rb +1 -1
  29. data/lib/tramway/news.rb +2 -4
  30. metadata +33 -103
  31. data/.gitignore +0 -11
  32. data/.rspec +0 -3
  33. data/.travis.yml +0 -5
  34. data/Gemfile +0 -6
  35. data/Gemfile.lock +0 -102
  36. data/bin/console +0 -14
  37. data/bin/setup +0 -8
  38. data/lib/tramway/news/generators/templates/create_news.rb +0 -18
  39. data/lib/tramway/news/generators.rb +0 -6
  40. data/tramway-news.gemspec +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a71deebf17ec0ab4dcdb4ae891707aab15c30e34
4
- data.tar.gz: a62f82082c1e06df4501152afe132c3d0635d98d
2
+ SHA256:
3
+ metadata.gz: 2eb3c3cb42060d1e7159df372946015777d6134578d3f694967ce1f53702dd43
4
+ data.tar.gz: 0d459b6f275b2c8f708683c748424e65884a5f566a8671202756d48f35703fb2
5
5
  SHA512:
6
- metadata.gz: c8bf8d4f0f0ee857c6017525112c3966a529b904b57e09faa0bcfe995fd160a770e3d5758ab16520a6671d55808361406dd287b1e2a822d38fd12f5e6664f2c5
7
- data.tar.gz: f1711b9adec0155afeb4f2d678a73eca048afd94b1a8584f32eb7f43d5b91b6c9d5c0dbd4b370cc7c285e1ddfbb4dcd347e5c0709bae14fc0dcc2be9beea5cca
6
+ metadata.gz: a5a08f9107ce94604299d7033a4c1325ca661dcc1fa642c987f933e64804389e29e1f37bdfc8ba336173f458538d855452df5b0ddb5a0bef0fac7643fcff8dbe
7
+ data.tar.gz: 00aad3fa15bccd6d0a1d756c619c5e27f6f04457aa3245fc60b6da64b97c729a371efa8521471196c6d50a01f7f0d8bbd7974f4f08de153b3a25ee651aab56d4
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2018 Pavel Kalashnikov
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # Tramway::News
2
+ Short description and motivation.
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tramway/news`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
4
+ ## Usage
5
+ How to use my plugin.
6
6
 
7
7
  ## Installation
8
-
9
8
  Add this line to your application's Gemfile:
10
9
 
11
10
  ```ruby
@@ -13,23 +12,17 @@ gem 'tramway-news'
13
12
  ```
14
13
 
15
14
  And then execute:
16
-
17
- $ bundle
15
+ ```bash
16
+ $ bundle
17
+ ```
18
18
 
19
19
  Or install it yourself as:
20
-
21
- $ gem install tramway-news
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- 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`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
+ ```bash
21
+ $ gem install tramway-news
22
+ ```
32
23
 
33
24
  ## Contributing
25
+ Contribution directions go here.
34
26
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tramway-news.
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,6 +1,36 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
3
6
 
4
- RSpec::Core::RakeTask.new(:spec)
7
+ require 'rdoc/task'
5
8
 
6
- task :default => :spec
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Tramway::News'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+
24
+
25
+ require 'bundler/gem_tasks'
26
+
27
+ require 'rake/testtask'
28
+
29
+ Rake::TestTask.new(:test) do |t|
30
+ t.libs << 'test'
31
+ t.pattern = 'test/**/*_test.rb'
32
+ t.verbose = false
33
+ end
34
+
35
+
36
+ task default: :test
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/tramway/news .js
2
+ //= link_directory ../stylesheets/tramway/news .css
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1 @@
1
+ @import "bootstrap"
@@ -0,0 +1,7 @@
1
+ module Tramway
2
+ module News
3
+ class ApplicationController < ActionController::Base
4
+ protect_from_forgery with: :exception
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ class ::Tramway::News::NewsController < ::Tramway::News::ApplicationController
2
+ layout 'tramway/landing/application'
3
+
4
+ def show
5
+ @news = ::Tramway::News::News.find params[:id]
6
+ @author = ::Tramway::News::UserDecorator.decorate @news.author
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ class Tramway::Landing::Cards::NewsDecorator < ::Tramway::Landing::BlockTypes::CardsDecorator
2
+ def image
3
+ object.photo.card.url
4
+ end
5
+
6
+ def description
7
+ object.body.first 200
8
+ end
9
+
10
+ def path
11
+ "/news/#{object.id}"
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ class Tramway::News::NewsDecorator < ::Tramway::Core::ApplicationDecorator
2
+ class << self
3
+ def collections
4
+ [ :all ]
5
+ end
6
+ end
7
+
8
+ def lead
9
+ object.body.first 200
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class ::Tramway::News::UserDecorator < ::Tramway::Core::ApplicationDecorator
2
+ def short_name
3
+ "#{object.first_name} #{object.last_name}"
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class Tramway::News::NewsForm < ::Tramway::Core::ApplicationForm
2
+ properties :title, :body, :published_at, :photo
3
+
4
+ def initialize(object)
5
+ form_object = super object
6
+ form_properties title: :string,
7
+ body: :text,
8
+ photo: :file
9
+ form_object
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module Tramway
2
+ module News
3
+ module ApplicationHelper
4
+ include ::FontAwesome::Rails::IconHelper
5
+
6
+ def title(text)
7
+ content_for :title do
8
+ text
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ module Tramway
2
+ module News
3
+ class ApplicationJob < ActiveJob::Base
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ module Tramway
2
+ module News
3
+ class ApplicationMailer < ActionMailer::Base
4
+ default from: 'from@example.com'
5
+ layout 'mailer'
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module Tramway
2
+ module News
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ self.abstract_class = true
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class ::Tramway::News::News < ::Tramway::Core::ApplicationRecord
2
+ mount_uploader :photo, PhotoUploader
3
+
4
+ def author
5
+ audits.where(action: :create).first.user
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ = render 'tramway/landing/blocks/block_types/cards', block: block
@@ -0,0 +1,20 @@
1
+ - title @news.title
2
+ = content_for :head_content do
3
+ = stylesheet_link_tag 'tramway/news/application'
4
+
5
+ .row
6
+ .col-md-12
7
+ .view.hm-white-slight{ style: "background-image: url('#{'https://mdbootstrap.com/img/Photos/Slides/img%20(142).jpg'}'); height: 60vh" }
8
+ .container-fluid.full-bg-img.d-flex.align-items-center.justify-content-center
9
+ .row.d-flex.justify-content-center
10
+ .col-md-10.text-center
11
+ %h4.display-3.font-bold.white-text.mb-2
12
+ = @news.title
13
+ .row
14
+ .col-md-12.text-left.mt-1
15
+ %h5
16
+ = @author.short_name
17
+ = @news.created_at.strftime('%d.%m.%Y')
18
+ .row
19
+ .col-md-12.excerpt.mt-1
20
+ = @news.body
@@ -0,0 +1 @@
1
+ ::Tramway::Admin.set_available_models ::Tramway::News::News
@@ -0,0 +1,8 @@
1
+ ru:
2
+ activerecord:
3
+ models:
4
+ tramway/news/news: Новость
5
+ cases:
6
+ tramway/news/news:
7
+ plural: новости
8
+ genitive: новость
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ Tramway::News::Engine.routes.draw do
2
+ resources :news, only: :show
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :tramway_news do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,7 @@
1
+ module Tramway
2
+ module News
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Tramway::News
5
+ end
6
+ end
7
+ end
@@ -1,8 +1,13 @@
1
+ require 'rails/generators'
2
+ require 'tramway/core/generators/install_generator'
3
+
1
4
  module Tramway::News::Generators
2
- class InstallGenerator < ::Rails::Generators::Base
5
+ class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
3
6
  include Rails::Generators::Migration
4
7
  source_root File.expand_path('../templates', __FILE__)
5
- desc "Add the migrations for News"
8
+
9
+ def run_other_generators
10
+ end
6
11
 
7
12
  def self.next_migration_number(path)
8
13
  next_migration_number = current_migration_number(path) + 1
@@ -10,7 +15,7 @@ module Tramway::News::Generators
10
15
  end
11
16
 
12
17
  def copy_migrations
13
- migration_template "create_news.rb", "db/migrate/create_news.rb"
18
+ migration_template 'create_tramway_news_news.rb', 'db/migrate/create_tramway_news_news.rb'
14
19
  end
15
20
  end
16
21
  end
@@ -0,0 +1,13 @@
1
+ class CreateTramwayNewsNews < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :tramway_news_news do |t|
4
+ t.text :title
5
+ t.text :body
6
+ t.datetime :published_at
7
+ t.text :photo
8
+ t.text :state, default: :active
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module News
3
- VERSION = "0.1.0"
3
+ VERSION = '1.0'
4
4
  end
5
5
  end
data/lib/tramway/news.rb CHANGED
@@ -1,9 +1,7 @@
1
- require 'active_record'
2
- require "tramway/news/version"
3
- require 'tramway/news/generators'
1
+ require "tramway/news/engine"
2
+ require 'tramway/news/generators/install_generator'
4
3
 
5
4
  module Tramway
6
5
  module News
7
- # Your code goes here...
8
6
  end
9
7
  end
metadata CHANGED
@@ -1,123 +1,53 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-news
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-19 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activerecord
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.16'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.16'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: generator_spec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: pry
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- description: Engine for news
11
+ date: 2018-02-21 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Rails engine for news
98
14
  email:
99
15
  - kalashnikovisme@gmail.com
100
16
  executables: []
101
17
  extensions: []
102
18
  extra_rdoc_files: []
103
19
  files:
104
- - ".gitignore"
105
- - ".rspec"
106
- - ".travis.yml"
107
- - Gemfile
108
- - Gemfile.lock
20
+ - MIT-LICENSE
109
21
  - README.md
110
22
  - Rakefile
111
- - bin/console
112
- - bin/setup
23
+ - app/assets/config/tramway_news_manifest.js
24
+ - app/assets/javascripts/tramway/news/application.js
25
+ - app/assets/stylesheets/tramway/news/application.sass
26
+ - app/controllers/tramway/news/application_controller.rb
27
+ - app/controllers/tramway/news/news_controller.rb
28
+ - app/decorators/tramway/landing/cards/news_decorator.rb
29
+ - app/decorators/tramway/news/news_decorator.rb
30
+ - app/decorators/tramway/news/user_decorator.rb
31
+ - app/forms/tramway/news/news_form.rb
32
+ - app/helpers/tramway/news/application_helper.rb
33
+ - app/jobs/tramway/news/application_job.rb
34
+ - app/mailers/tramway/news/application_mailer.rb
35
+ - app/models/tramway/news/application_record.rb
36
+ - app/models/tramway/news/news.rb
37
+ - app/views/tramway/landing/blocks/block_types/_news.html.haml
38
+ - app/views/tramway/news/news/show.html.haml
39
+ - config/initializers/tramway.rb
40
+ - config/locales/models.yml
41
+ - config/routes.rb
42
+ - lib/tasks/tramway/news_tasks.rake
113
43
  - lib/tramway/news.rb
114
- - lib/tramway/news/generators.rb
44
+ - lib/tramway/news/engine.rb
115
45
  - lib/tramway/news/generators/install_generator.rb
116
- - lib/tramway/news/generators/templates/create_news.rb
46
+ - lib/tramway/news/generators/templates/create_tramway_news_news.rb
117
47
  - lib/tramway/news/version.rb
118
- - tramway-news.gemspec
119
- homepage: https://github.com/kalashnikovisme/tramway-news
120
- licenses: []
48
+ homepage: https://github.com/ulmic/tramway-news
49
+ licenses:
50
+ - MIT
121
51
  metadata: {}
122
52
  post_install_message:
123
53
  rdoc_options: []
@@ -135,8 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
65
  version: '0'
136
66
  requirements: []
137
67
  rubyforge_project:
138
- rubygems_version: 2.6.11
68
+ rubygems_version: 2.7.3
139
69
  signing_key:
140
70
  specification_version: 4
141
- summary: Engine for news
71
+ summary: Rails engine for news
142
72
  test_files: []
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.16.0
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in tramway-news.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,102 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tramway-news (0.1.0)
5
- activerecord
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionpack (5.1.4)
11
- actionview (= 5.1.4)
12
- activesupport (= 5.1.4)
13
- rack (~> 2.0)
14
- rack-test (>= 0.6.3)
15
- rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
- actionview (5.1.4)
18
- activesupport (= 5.1.4)
19
- builder (~> 3.1)
20
- erubi (~> 1.4)
21
- rails-dom-testing (~> 2.0)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
23
- activemodel (5.1.4)
24
- activesupport (= 5.1.4)
25
- activerecord (5.1.4)
26
- activemodel (= 5.1.4)
27
- activesupport (= 5.1.4)
28
- arel (~> 8.0)
29
- activesupport (5.1.4)
30
- concurrent-ruby (~> 1.0, >= 1.0.2)
31
- i18n (~> 0.7)
32
- minitest (~> 5.1)
33
- tzinfo (~> 1.1)
34
- arel (8.0.0)
35
- builder (3.2.3)
36
- coderay (1.1.2)
37
- concurrent-ruby (1.0.5)
38
- crass (1.0.3)
39
- diff-lcs (1.3)
40
- erubi (1.7.0)
41
- generator_spec (0.9.4)
42
- activesupport (>= 3.0.0)
43
- railties (>= 3.0.0)
44
- i18n (0.9.1)
45
- concurrent-ruby (~> 1.0)
46
- loofah (2.1.1)
47
- crass (~> 1.0.2)
48
- nokogiri (>= 1.5.9)
49
- method_source (0.9.0)
50
- mini_portile2 (2.3.0)
51
- minitest (5.10.3)
52
- nokogiri (1.8.1)
53
- mini_portile2 (~> 2.3.0)
54
- pry (0.11.3)
55
- coderay (~> 1.1.0)
56
- method_source (~> 0.9.0)
57
- rack (2.0.3)
58
- rack-test (0.7.0)
59
- rack (>= 1.0, < 3)
60
- rails-dom-testing (2.0.3)
61
- activesupport (>= 4.2.0)
62
- nokogiri (>= 1.6)
63
- rails-html-sanitizer (1.0.3)
64
- loofah (~> 2.0)
65
- railties (5.1.4)
66
- actionpack (= 5.1.4)
67
- activesupport (= 5.1.4)
68
- method_source
69
- rake (>= 0.8.7)
70
- thor (>= 0.18.1, < 2.0)
71
- rake (10.5.0)
72
- rspec (3.7.0)
73
- rspec-core (~> 3.7.0)
74
- rspec-expectations (~> 3.7.0)
75
- rspec-mocks (~> 3.7.0)
76
- rspec-core (3.7.0)
77
- rspec-support (~> 3.7.0)
78
- rspec-expectations (3.7.0)
79
- diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.7.0)
81
- rspec-mocks (3.7.0)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.7.0)
84
- rspec-support (3.7.0)
85
- thor (0.20.0)
86
- thread_safe (0.3.6)
87
- tzinfo (1.2.4)
88
- thread_safe (~> 0.1)
89
-
90
- PLATFORMS
91
- ruby
92
-
93
- DEPENDENCIES
94
- bundler (~> 1.16)
95
- generator_spec
96
- pry
97
- rake (~> 10.0)
98
- rspec (~> 3.0)
99
- tramway-news!
100
-
101
- BUNDLED WITH
102
- 1.16.0
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "tramway/news"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,18 +0,0 @@
1
- # FIXME specify rails version
2
- # default is 5.1
3
-
4
- class CreateNews < ActiveRecord::Migration[5.1]
5
- def change
6
- create_table :news do |t|
7
- t.text :title
8
- t.text :body
9
- t.datetime :published_at
10
- t.text :photo
11
- t.integer :author_id
12
- t.text :state
13
- t.text :lead
14
-
15
- t.timestamps null: false
16
- end
17
- end
18
- end
@@ -1,6 +0,0 @@
1
- require 'rails/generators'
2
- require 'rails/generators/migration'
3
- require 'tramway/news/generators/install_generator'
4
-
5
- module Tramway::News::Generators
6
- end
data/tramway-news.gemspec DELETED
@@ -1,29 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "tramway/news/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "tramway-news"
7
- spec.version = Tramway::News::VERSION
8
- spec.authors = ["Pavel Kalashnikov"]
9
- spec.email = ["kalashnikovisme@gmail.com"]
10
-
11
- spec.summary = %q{Engine for news}
12
- spec.description = %q{Engine for news}
13
- spec.homepage = "https://github.com/kalashnikovisme/tramway-news"
14
-
15
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
- f.match(%r{^(test|spec|features)/})
17
- end
18
- spec.bindir = "exe"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_dependency 'activerecord'
23
-
24
- spec.add_development_dependency "bundler", "~> 1.16"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency 'generator_spec'
28
- spec.add_development_dependency 'pry'
29
- end