pixelforce_cms 1.0 → 2.0

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: 86bec6a7b350b5ed94ff8971e264aaf394a9e469
4
- data.tar.gz: 1d6b2eaa36c1b0d61b2904f870554dcd2ec5bf2c
3
+ metadata.gz: 94e369f2069cd38fa8eecd04613410930fcb3f57
4
+ data.tar.gz: cdfd0a098e1909fd2b2f65283bc56a11cf506781
5
5
  SHA512:
6
- metadata.gz: 5df76fd6877d523ef3f9c58af924411f07a0832b160b0f2359999969623980be30f7de407aa90206a114f3cfc29ba00eed8267f104a1400ec5de47b452c6b3cb
7
- data.tar.gz: 36ee115dd8290a567da2133dc6ed9b629a35550c819d195d2930604d5342fc241e639ec48821545a7d273ed9055a818a45a5b174ee8bd6e5b414fe086fa655e9
6
+ metadata.gz: 52905a0d469cccf95820593d9c4617ec799481c7c612e307e30a10a4e006d5d605fce3d6b9954173a85735e46fc2d5a9fe27f4ce35871fcbf3b497f7eff99f0d
7
+ data.tar.gz: 6136a1284ad341df49261e678d1fd3175d441d4d886037069f360cd678b6945eb3f1764e61b4597efcace98535f6bed62367c4d5eea6e1370d734e66e1a7b072
@@ -57,6 +57,7 @@ module PixelforceCms
57
57
 
58
58
  def copy_model_files
59
59
  copy_file "pretty_url.rb", "app/models/concerns/pretty_url.rb"
60
+ copy_file "double.rb", "app/models/double.rb"
60
61
  end
61
62
 
62
63
  def config_application
@@ -1,79 +1,89 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '3.2.18'
4
3
 
5
- # Bundle edge Rails instead:
6
- # gem 'rails', :git => 'git://github.com/rails/rails.git'
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '4.1.8'
7
6
 
8
- gem 'mysql2'
7
+ gem 'pg'
9
8
 
10
- gem 'devise', '~> 3.1'
11
- gem 'simple_form', '~> 2.0'
9
+ # SEO pack
10
+ gem 'sitemap_generator'
11
+ gem 'meta-tags', require: 'meta_tags'
12
+
13
+ gem 'nested_form', git: 'git://github.com/BenZhang/nested_form.git'
14
+
15
+ gem 'haml-rails'
16
+
17
+ gem 'font-awesome-rails'
18
+ gem 'html5-rails'
19
+ gem 'fancybox2-rails'
20
+
21
+ gem 'sass-rails', '~> 4.0.3'
22
+ gem 'compass-rails'
23
+ gem 'compass-h5bp'
24
+
25
+ # Use Uglifier as compressor for JavaScript assets
26
+ gem 'uglifier', '>= 1.3.0'
27
+
28
+ # Use CoffeeScript for .js.coffee assets and views
29
+ gem 'coffee-rails', '~> 4.0.0'
30
+
31
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
32
+ gem 'therubyracer', platforms: :ruby
33
+ gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
34
+ gem 'bootstrap-sass', '~> 3.0.3.0'
35
+
36
+ # Use jquery as the JavaScript library
37
+ gem 'jquery-rails'
38
+ gem 'jquery-ui-rails'
39
+
40
+ gem 'devise', '~> 3.4.1'
12
41
  gem 'paperclip'
42
+ gem 'cancan'
43
+ gem 'exception_notification', '~> 4.0.1'
13
44
 
14
- # SEO pack
15
- gem 'meta-tags', :require => 'meta_tags'
16
-
17
- # exception handle
18
- gem 'exception_notification'
19
-
20
- # pixelforce template
21
- gem 'pixelforce_cms', '~> 0.9.9.5'
22
-
23
- # Gems used only for assets and not required
24
- # in production environments by default.
25
- group :assets do
26
- gem 'sass-rails', '~> 3.2.6'
27
- gem 'coffee-rails', '~> 3.2.1'
28
-
29
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
30
- # gem 'therubyracer', :platforms => :ruby
31
-
32
- #HTML5
33
- gem 'compass-rails', '~> 1.1.7'
34
- gem 'compass-h5bp', '~> 0.1.2'
35
- gem 'uglifier', '>= 1.0.3'
36
-
37
- #Bootstrap
38
- gem "therubyracer"
39
- gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
40
- gem 'bootstrap-sass', '~> 3.0.3.0'
41
-
42
- gem 'jquery-ui-rails'
43
- gem 'fancybox2-rails', '~> 0.2.4'
44
- end
45
+ #pagination
46
+ gem 'kaminari'
47
+ gem 'bootstrap-kaminari-views'
48
+ gem 'simple_form'
49
+ gem 'au_state_select', '~> 1.1'
45
50
 
46
- group :development, :test do
47
- gem 'quiet_assets'
51
+ #ancestry
52
+ gem 'ancestry'
53
+
54
+ group :test do
48
55
  gem 'rspec'
49
- gem 'rspec-rails', '~> 2.13'
50
- # Deploy with Capistrano
51
- gem 'capistrano'
52
- gem 'rvm-capistrano'
53
- gem "capistrano-db-tasks", require: false, github: 'gkopylov/capistrano-db-tasks', ref: 'f3949cd'
54
- gem 'factory_girl_rails'
55
- gem 'thin'
56
+ gem 'rspec-rails', '~> 3.0'
57
+ gem 'simplecov'
58
+ gem "factory_girl_rails", "~> 4.0"
56
59
  end
57
60
 
58
- gem "font-awesome-rails"
59
- gem 'sass'
60
- gem 'html5-rails'
61
- gem 'jquery-rails'
61
+ gem 'ckeditor'
62
62
 
63
- gem 'haml', '~> 4.0.0'
64
- gem 'haml-rails', '~> 0.4'
63
+ # keep track of views count
64
+ gem 'views_count', '0.0.3'
65
65
 
66
- # To use ActiveModel has_secure_password
67
- # gem 'bcrypt-ruby', '~> 3.0.0'
66
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
68
67
 
69
- # To use Jbuilder templates for JSON
70
- # gem 'jbuilder'
68
+ # Use ActiveModel has_secure_password
69
+ gem 'bcrypt', '~> 3.1.7'
71
70
 
72
71
  # Use unicorn as the app server
73
72
  gem 'unicorn'
74
73
 
75
- # Deploy with Capistrano
76
- # gem 'capistrano'
74
+ gem 'jquery-datetimepicker-rails'
75
+
76
+
77
+ group :development do
78
+ gem 'spring'
79
+ gem 'capistrano', '2.15.5'
80
+ gem 'rvm-capistrano'
81
+ gem "capistrano-db-tasks", require: false, github: 'gkopylov/capistrano-db-tasks', ref: 'f3949cd'
82
+ gem 'quiet_assets'
83
+ gem "better_errors"
84
+ gem "binding_of_caller"
85
+ gem 'pixelforce_cms', '~> 1.0'
86
+ end
77
87
 
78
- # To use debugger
79
- # gem 'debugger'
88
+ # Use debugger
89
+ # gem 'debugger', group: [:development, :test]
@@ -0,0 +1,17 @@
1
+ class Double
2
+ include ActiveModel::Conversion
3
+ extend ActiveModel::Naming
4
+ include ActiveModel::Validations
5
+
6
+ def initialize(attrs = {})
7
+ end
8
+
9
+ def persisted?
10
+ false
11
+ end
12
+
13
+ def method_missing(method_sym, *arguments, &block)
14
+ return ''
15
+ end
16
+
17
+ end
@@ -2,7 +2,18 @@ module PrettyUrl
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
- before_save :update_url_name
5
+ after_save :update_url_name
6
+ end
7
+
8
+ module ClassMethods
9
+ def find(id, options = {})
10
+ if id.is_a?(String)
11
+ real_id = /(.*\-)?(?<id>\d+)\Z/.match(id)[:id]
12
+ else
13
+ real_id = id
14
+ end
15
+ super(real_id, options)
16
+ end
6
17
  end
7
18
 
8
19
  def to_param
@@ -11,7 +22,7 @@ module PrettyUrl
11
22
 
12
23
  private
13
24
  def update_url_name
14
- self.url_name = name.parameterize if name_changed? and !url_name_changed?
25
+ self.url_name = "#{name.to_url}-#{id}" if name_changed? and !url_name_changed?
15
26
  end
16
27
 
17
28
  end
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "1.0"
2
+ VERSION = "2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelforce_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '2.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Zhang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-18 00:00:00.000000000 Z
11
+ date: 2015-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,6 +75,7 @@ files:
75
75
  - lib/generators/pixelforce_cms/templates/css/style.css.scss
76
76
  - lib/generators/pixelforce_cms/templates/css/style.responsive.css.scss
77
77
  - lib/generators/pixelforce_cms/templates/deploy.rb
78
+ - lib/generators/pixelforce_cms/templates/double.rb
78
79
  - lib/generators/pixelforce_cms/templates/edit.html.haml
79
80
  - lib/generators/pixelforce_cms/templates/index.html.haml
80
81
  - lib/generators/pixelforce_cms/templates/javascripts/application.js