trusty-snippets-extension 1.1.0 → 2.0.0.pre.beta

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
- ZTJmYzk1ZjkxM2U4YzkwOTk1NzFhMTg3YTk0YTE1OTcwMGExMTE5Mg==
4
+ NTQ5YjBjMDYwMzBmYjg2MGU4ZWY2ZTFmMDQ2Y2FlNjhmYjNkNGU4ZQ==
5
5
  data.tar.gz: !binary |-
6
- YWUxMTk4OGFiZmYzZDI5M2VmZWI4NWQzODkxYzkzOGJlMGJjYjdkZQ==
6
+ Zjg3MGRiNTBhZGFlZDI1MzRjMjg3YWMxZTQ0MmVkZWRlMDA1MTVhNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGU5M2ZjMjc4OGRjZjJlYWJmMTI4M2M3MDhlNjU2ZjQ4ZDk1YjAxMjVlYTM3
10
- NTFhYjgxNGRjODJjNzAxNjgwOTMzNzEzZjM4ZTQ5ZmE4Y2NkZjZiNjcwZjQ0
11
- OGE2ZjZiMDJiZGVmMTdhMzE1ODk1OTYxZTNiZDAxYjE2ZTJkMmU=
9
+ MTY3MTc0Nzk2MTE5MmFkNDMyNzVlMDFhZmY2ZjEzYmNlNWZlNTI5ZjBmNGU5
10
+ Nzg1N2FiZjVkNGUxOWQyMTJhNDlkNWVjZjY1ZjcwYjFiMWQ3Mzg4ODc5NGU2
11
+ OWU1MmFjYTgyZmMxNDAzYzQ5N2YxOTQ1ODllNTI4MDk2MGJmNzE=
12
12
  data.tar.gz: !binary |-
13
- OWE0OTU0MDllYzQzODk0MDkzMzdlOTMxMWQyYWFlYTgyZjFkYjIzNTg2NDk0
14
- MjEyMmFiNjU2YWI2NzVmN2ZjY2MyNjNjYWFlY2MzNmY5Mjc0N2M5YzdlNDg4
15
- OGNmMWZmN2NjOGQ3ZDE4YTcyM2RlMzBkZWE3YjRlZDQxN2E4OTI=
13
+ MGQ2MWVkMmRjNTY0M2Y0YTJjY2U0ZTE2OTZlNTllZTQ2MTI2MTY1OGY3NTk1
14
+ ZmE2MjA3ZDc1MTNmYzQ4ZGMyMjYxOTkwYzNlNjBhZDhhOWNlZDhmZGI0MGJi
15
+ Yzk5YzhkYTcyZDQwZmY3YmU5ZTQzOTViNjhkMmRiMDVlZWM3ZjI=
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gem 'trustygems', '~> 0.1.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,7 @@
1
+ GEM
2
+ specs:
3
+
4
+ PLATFORMS
5
+ ruby
6
+
7
+ DEPENDENCIES
data/Rakefile CHANGED
@@ -1,109 +1,111 @@
1
- # Determine where the RSpec plugin is by loading the boot
2
- unless defined? RADIANT_ROOT
3
- ENV["RAILS_ENV"] = "test"
4
- case
5
- when ENV["RADIANT_ENV_FILE"]
6
- require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
7
- when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
8
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
9
- else
10
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
11
- end
12
- end
1
+ require 'trustygems'
13
2
 
14
- require 'rake'
15
- require 'rdoc/task'
16
- require 'rake/testtask'
17
-
18
- rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
19
- $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
20
- require 'spec/rake/spectask'
21
- require 'cucumber'
22
- require 'cucumber/rake/task'
23
-
24
- # Cleanup the RADIANT_ROOT constant so specs will load the environment
25
- Object.send(:remove_const, :RADIANT_ROOT)
26
-
27
- extension_root = File.expand_path(File.dirname(__FILE__))
28
-
29
- task :default => [:spec, :features]
30
- task :stats => "spec:statsetup"
31
-
32
- desc "Run all specs in spec directory"
33
- Spec::Rake::SpecTask.new(:spec) do |t|
34
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
35
- t.spec_files = FileList['spec/**/*_spec.rb']
36
- end
37
-
38
- task :features => 'spec:integration'
39
-
40
- namespace :spec do
41
- desc "Run all specs in spec directory with RCov"
42
- Spec::Rake::SpecTask.new(:rcov) do |t|
43
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
44
- t.spec_files = FileList['spec/**/*_spec.rb']
45
- t.rcov = true
46
- t.rcov_opts = ['--exclude', 'spec', '--rails']
47
- end
48
-
49
- desc "Print Specdoc for all specs"
50
- Spec::Rake::SpecTask.new(:doc) do |t|
51
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
52
- t.spec_files = FileList['spec/**/*_spec.rb']
53
- end
54
-
55
- [:models, :controllers, :views, :helpers].each do |sub|
56
- desc "Run the specs under spec/#{sub}"
57
- Spec::Rake::SpecTask.new(sub) do |t|
58
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
59
- t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
60
- end
61
- end
62
-
63
- desc "Run the Cucumber features"
64
- Cucumber::Rake::Task.new(:integration) do |t|
65
- t.fork = true
66
- t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
67
- # t.feature_pattern = "#{extension_root}/features/**/*.feature"
68
- t.profile = "default"
69
- end
70
-
71
- # Setup specs for stats
72
- task :statsetup do
73
- require 'code_statistics'
74
- ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
75
- ::STATS_DIRECTORIES << %w(View\ specs spec/views)
76
- ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
77
- ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
78
- ::CodeStatistics::TEST_TYPES << "Model specs"
79
- ::CodeStatistics::TEST_TYPES << "View specs"
80
- ::CodeStatistics::TEST_TYPES << "Controller specs"
81
- ::CodeStatistics::TEST_TYPES << "Helper specs"
82
- ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
83
- end
84
-
85
- namespace :db do
86
- namespace :fixtures do
87
- desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
88
- task :load => :environment do
89
- require 'active_record/fixtures'
90
- ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
91
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
92
- Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
93
- end
94
- end
95
- end
96
- end
97
- end
98
-
99
- desc 'Generate documentation for the snippets extension.'
100
- RDoc::Task.new(:rdoc) do |rdoc|
101
- rdoc.rdoc_dir = 'rdoc'
102
- rdoc.title = 'SnippetsExtension'
103
- rdoc.options << '--line-numbers' << '--inline-source'
104
- rdoc.rdoc_files.include('README')
105
- rdoc.rdoc_files.include('lib/**/*.rb')
106
- end
107
-
108
- # Load any custom rakefiles for extension
109
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
3
+ # # Determine where the RSpec plugin is by loading the boot
4
+ # unless defined? RADIANT_ROOT
5
+ # ENV["RAILS_ENV"] = "test"
6
+ # case
7
+ # when ENV["RADIANT_ENV_FILE"]
8
+ # require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
9
+ # when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
10
+ # require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
11
+ # else
12
+ # require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
13
+ # end
14
+ # end
15
+ #
16
+ # require 'rake'
17
+ # require 'rdoc/task'
18
+ # require 'rake/testtask'
19
+ #
20
+ # rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
21
+ # $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
22
+ # require 'spec/rake/spectask'
23
+ # require 'cucumber'
24
+ # require 'cucumber/rake/task'
25
+ #
26
+ # # Cleanup the RADIANT_ROOT constant so specs will load the environment
27
+ # Object.send(:remove_const, :RADIANT_ROOT)
28
+ #
29
+ # extension_root = File.expand_path(File.dirname(__FILE__))
30
+ #
31
+ # task :default => [:spec, :features]
32
+ # task :stats => "spec:statsetup"
33
+ #
34
+ # desc "Run all specs in spec directory"
35
+ # Spec::Rake::SpecTask.new(:spec) do |t|
36
+ # t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
37
+ # t.spec_files = FileList['spec/**/*_spec.rb']
38
+ # end
39
+ #
40
+ # task :features => 'spec:integration'
41
+ #
42
+ # namespace :spec do
43
+ # desc "Run all specs in spec directory with RCov"
44
+ # Spec::Rake::SpecTask.new(:rcov) do |t|
45
+ # t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
46
+ # t.spec_files = FileList['spec/**/*_spec.rb']
47
+ # t.rcov = true
48
+ # t.rcov_opts = ['--exclude', 'spec', '--rails']
49
+ # end
50
+ #
51
+ # desc "Print Specdoc for all specs"
52
+ # Spec::Rake::SpecTask.new(:doc) do |t|
53
+ # t.spec_opts = ["--format", "specdoc", "--dry-run"]
54
+ # t.spec_files = FileList['spec/**/*_spec.rb']
55
+ # end
56
+ #
57
+ # [:models, :controllers, :views, :helpers].each do |sub|
58
+ # desc "Run the specs under spec/#{sub}"
59
+ # Spec::Rake::SpecTask.new(sub) do |t|
60
+ # t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
61
+ # t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
62
+ # end
63
+ # end
64
+ #
65
+ # desc "Run the Cucumber features"
66
+ # Cucumber::Rake::Task.new(:integration) do |t|
67
+ # t.fork = true
68
+ # t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
69
+ # # t.feature_pattern = "#{extension_root}/features/**/*.feature"
70
+ # t.profile = "default"
71
+ # end
72
+ #
73
+ # # Setup specs for stats
74
+ # task :statsetup do
75
+ # require 'code_statistics'
76
+ # ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
77
+ # ::STATS_DIRECTORIES << %w(View\ specs spec/views)
78
+ # ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
79
+ # ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
80
+ # ::CodeStatistics::TEST_TYPES << "Model specs"
81
+ # ::CodeStatistics::TEST_TYPES << "View specs"
82
+ # ::CodeStatistics::TEST_TYPES << "Controller specs"
83
+ # ::CodeStatistics::TEST_TYPES << "Helper specs"
84
+ # ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
85
+ # end
86
+ #
87
+ # namespace :db do
88
+ # namespace :fixtures do
89
+ # desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
90
+ # task :load => :environment do
91
+ # require 'active_record/fixtures'
92
+ # ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
93
+ # (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
94
+ # Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
95
+ # end
96
+ # end
97
+ # end
98
+ # end
99
+ # end
100
+ #
101
+ # desc 'Generate documentation for the snippets extension.'
102
+ # RDoc::Task.new(:rdoc) do |rdoc|
103
+ # rdoc.rdoc_dir = 'rdoc'
104
+ # rdoc.title = 'SnippetsExtension'
105
+ # rdoc.options << '--line-numbers' << '--inline-source'
106
+ # rdoc.rdoc_files.include('README')
107
+ # rdoc.rdoc_files.include('lib/**/*.rb')
108
+ # end
109
+ #
110
+ # # Load any custom rakefiles for extension
111
+ # Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
@@ -1,7 +1,7 @@
1
1
  class Snippet < ActiveRecord::Base
2
2
 
3
3
  # Default Order
4
- default_scope :order => 'name'
4
+ default_scope {order('name')}
5
5
 
6
6
  # Associations
7
7
  belongs_to :created_by, :class_name => 'User'
@@ -11,7 +11,7 @@ class Snippet < ActiveRecord::Base
11
11
  validates_presence_of :name
12
12
  validates_length_of :name, :maximum => 100
13
13
  validates_length_of :filter_id, :maximum => 25, :allow_nil => true
14
- validates_format_of :name, :with => %r{^\S*$}
14
+ validates_format_of :name, :with => %r{\A\S*\z}
15
15
  validates_uniqueness_of :name
16
16
 
17
17
  object_id_attr :filter, TextFilter
@@ -0,0 +1,2 @@
1
+ gemspec: trusty-snippets-extension.gemspec
2
+ deploy_command: gem push
@@ -1,5 +1,5 @@
1
1
  module TrustySnippetsExtension
2
- VERSION = "1.1.0"
2
+ VERSION = "2.0.0-beta"
3
3
  SUMMARY = "Snippets for Trusty CMS"
4
4
  DESCRIPTION = "Makes Trusty better by adding snippets!"
5
5
  URL = "http://github.com/pgharts/trusty-snippets-extension"
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  # s.executables = Dir['bin/*'] - ignores
23
23
  s.require_paths = ["lib"]
24
24
 
25
- s.add_dependency "trusty-cms", "~> 1.2"
25
+ s.add_dependency "trusty-cms", "~> 2.0.0-beta"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-snippets-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-23 00:00:00.000000000 Z
12
+ date: 2015-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trusty-cms
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: '1.2'
20
+ version: 2.0.0.pre.beta
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: '1.2'
27
+ version: 2.0.0.pre.beta
28
28
  description: Makes Trusty better by adding snippets!
29
29
  email:
30
30
  - sipple@trustarts.org
@@ -32,6 +32,8 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - Gemfile
36
+ - Gemfile.lock
35
37
  - README.md
36
38
  - Rakefile
37
39
  - app/controllers/admin/snippets_controller.rb
@@ -48,6 +50,7 @@ files:
48
50
  - config/initializers/radiant_config.rb
49
51
  - config/locales/en.yml
50
52
  - config/routes.rb
53
+ - config/trustygems.yml
51
54
  - cucumber.yml
52
55
  - features/admin/configuration.feature
53
56
  - features/admin/pagination.feature
@@ -86,9 +89,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
89
  version: '0'
87
90
  required_rubygems_version: !ruby/object:Gem::Requirement
88
91
  requirements:
89
- - - ! '>='
92
+ - - ! '>'
90
93
  - !ruby/object:Gem::Version
91
- version: '0'
94
+ version: 1.3.1
92
95
  requirements: []
93
96
  rubyforge_project:
94
97
  rubygems_version: 2.4.5