tramway-news 1.0.4.1 → 1.0.4.2

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
  SHA256:
3
- metadata.gz: d045bd3475f65c8a5098a9ee87e97f8245827e6179c1b2e59f3fa46917cb9873
4
- data.tar.gz: f50c5f745626a3e7a87bc328bee0050af14c6e06aef18f254f76abc64d758e01
3
+ metadata.gz: e1bebd2edf6162b88a2963b8252ca0f59076b4705b627f09f27477db6cde5c3b
4
+ data.tar.gz: ccbb377780c04cbb980b2d53b7091b843e15954d70c30273cd1ed8da01b88723
5
5
  SHA512:
6
- metadata.gz: d7c73f6a32bef470be75a867e605374ee727f5c66e8fbd2f966e38b0ba5aef4ecaaf40af1be0a901d7ad24c80132a5b01fea2811134b3dad327711b29d2649f5
7
- data.tar.gz: 560984236e6d0429c706c3422c9c5cf8b644dcdb716e3ebdcda0b6a9e804e55b4361a067c8a07055e15081ff915a3a9341297a0c91c9ae384e2b3ca3c76b86c3
6
+ metadata.gz: bc9e4996d81eaf26a4ceb9ecfa60cfc73d3ff48032630837834a9a044bb6e36584a9524a9942ff22b689f4f42b7655703079f355db381c8b57a5cc3b0dff34e8
7
+ data.tar.gz: 8a91256cf11769cd6e75923cde499ebaeccafb7a81e9079a44b0ae3e1dbfef640c1ebd330def80b234f36830dbe4115447e8a46984015b6bf5ee3601af3dfc3e
data/README.md CHANGED
@@ -21,6 +21,13 @@ Or install it yourself as:
21
21
  $ gem install tramway-news
22
22
  ```
23
23
 
24
+ ### Versions table
25
+
26
+ | tramway-news | tramway-landing |
27
+ | ------------- | --------------- |
28
+ | < 1.0.4.2 | 1.x |
29
+ | >= 1.0.4.2 | 2.x |
30
+
24
31
  ## Contributing
25
32
  Contribution directions go here.
26
33
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -14,14 +16,11 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
16
  rdoc.rdoc_files.include('lib/**/*.rb')
15
17
  end
16
18
 
17
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
19
+ APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
18
20
  load 'rails/tasks/engine.rake'
19
21
 
20
-
21
22
  load 'rails/tasks/statistics.rake'
22
23
 
23
-
24
-
25
24
  require 'bundler/gem_tasks'
26
25
 
27
26
  require 'rake/testtask'
@@ -32,5 +31,4 @@ Rake::TestTask.new(:test) do |t|
32
31
  t.verbose = false
33
32
  end
34
33
 
35
-
36
34
  task default: :test
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  class ApplicationController < ActionController::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ::Tramway::News::NewsController < ::Tramway::News::ApplicationController
2
4
  layout 'tramway/landing/application'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Landing::Cards::NewsDecorator < ::Tramway::Landing::BlockTypes::CardsDecorator
2
4
  def image
3
5
  object.photo.card.url
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::News::NewsDecorator < ::Tramway::Core::ApplicationDecorator
2
4
  class << self
3
5
  def collections
4
- [ :all ]
6
+ [:all]
5
7
  end
6
8
  end
7
9
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ::Tramway::News::UserDecorator < ::Tramway::Core::ApplicationDecorator
2
4
  def short_name
3
5
  "#{object.first_name} #{object.last_name}"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::News::NewsForm < ::Tramway::Core::ApplicationForm
2
4
  properties :title, :body, :published_at, :photo
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  module ApplicationHelper
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  class ApplicationJob < ActiveJob::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  class ApplicationMailer < ActionMailer::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  class ApplicationRecord < ActiveRecord::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ::Tramway::News::News < ::Tramway::Core::ApplicationRecord
2
4
  mount_uploader :photo, PhotoUploader
3
5
 
@@ -1,7 +1,4 @@
1
1
  - title @news.title
2
- = content_for :head_content do
3
- = stylesheet_link_tag 'tramway/news/application'
4
-
5
2
  .container
6
3
  .row
7
4
  .col-md-12
@@ -1 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ::Tramway::Admin.set_available_models(::Tramway::News::News, project: :news)
4
+ ::Tramway::Landing.head_content = lambda do
5
+ stylesheet_link_tag 'tramway/news/application'
6
+ end
data/config/routes.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Tramway::News::Engine.routes.draw do
2
4
  resources :news, only: :show
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # desc "Explaining what the task does"
2
4
  # task :tramway_news do
3
5
  # # Task goes here
data/lib/tramway/news.rb CHANGED
@@ -1,4 +1,6 @@
1
- require "tramway/news/engine"
1
+ # frozen_string_literal: true
2
+
3
+ require 'tramway/news/engine'
2
4
  require 'tramway/news/generators/install_generator'
3
5
 
4
6
  module Tramway
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
5
  class Engine < ::Rails::Engine
@@ -1,13 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/generators'
2
4
  require 'tramway/core/generators/install_generator'
3
5
 
4
6
  module Tramway::News::Generators
5
7
  class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
6
8
  include Rails::Generators::Migration
7
- source_root File.expand_path('../templates', __FILE__)
9
+ source_root File.expand_path('templates', __dir__)
8
10
 
9
- def run_other_generators
10
- end
11
+ def run_other_generators; end
11
12
 
12
13
  def self.next_migration_number(path)
13
14
  next_migration_number = current_migration_number(path) + 1
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CreateTramwayNewsNews < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  create_table :tramway_news_news do |t|
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module News
3
- VERSION = '1.0.4.1'
5
+ VERSION = '1.0.4.2'
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-news
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4.1
4
+ version: 1.0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for news
14
14
  email:
@@ -64,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubyforge_project:
68
- rubygems_version: 2.7.6
67
+ rubygems_version: 3.0.3
69
68
  signing_key:
70
69
  specification_version: 4
71
70
  summary: Rails engine for news