simpleconfig 1.1.1 → 1.1.2
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.
- data/Rakefile +69 -0
- data/{rails/init.rb → init.rb} +1 -1
- data/{tasks → lib/tasks}/simple_config.rake +1 -1
- metadata +6 -6
data/Rakefile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/testtask'
|
3
3
|
require 'rake/rdoctask'
|
4
|
+
require "rubygems"
|
5
|
+
require "rake/gempackagetask"
|
4
6
|
|
5
7
|
desc 'Default: run unit tests.'
|
6
8
|
task :default => :test
|
@@ -20,3 +22,70 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
20
22
|
rdoc.rdoc_files.include('README')
|
21
23
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
22
24
|
end
|
25
|
+
|
26
|
+
# This builds the actual gem. For details of what all these options
|
27
|
+
# mean, and other ones you can add, check the documentation here:
|
28
|
+
#
|
29
|
+
# http://rubygems.org/read/chapter/20
|
30
|
+
#
|
31
|
+
spec = Gem::Specification.new do |s|
|
32
|
+
s.name = "simpleconfig"
|
33
|
+
s.version = "1.1.2"
|
34
|
+
s.date = "2010-09-13"
|
35
|
+
s.summary = "Simple object-oriented application settings for Ruby applications"
|
36
|
+
s.email = "luke@lukeredpath.co.uk"
|
37
|
+
s.homepage = "http://github.com/lukeredpath/simpleconfig"
|
38
|
+
s.description = "SimpleConfig is a plugin designed to make application-wide configuration settings (e.g. in a Rails app) easy to set and access in an object-oriented fashion."
|
39
|
+
s.autorequire = "simpleconfig"
|
40
|
+
s.has_rdoc = false
|
41
|
+
s.authors = ["Luke Redpath"]
|
42
|
+
s.files = [
|
43
|
+
"lib/simple_config.rb",
|
44
|
+
"lib/simple_config/controller_mixin.rb",
|
45
|
+
"lib/simple_config/utilities.rb",
|
46
|
+
"lib/rails_compatibility.rb",
|
47
|
+
"lib/tasks/simple_config.rake",
|
48
|
+
"init.rb",
|
49
|
+
"Rakefile",
|
50
|
+
"README.textile",
|
51
|
+
"templates/configuration.rb"
|
52
|
+
]
|
53
|
+
s.test_files = [
|
54
|
+
"test/controller_mixin_test.rb",
|
55
|
+
"test/network_host_test.rb",
|
56
|
+
"test/simple_config_functional_test.rb",
|
57
|
+
"test/simple_config_test.rb",
|
58
|
+
"test/yaml_parser_test.rb"
|
59
|
+
]
|
60
|
+
end
|
61
|
+
|
62
|
+
# This task actually builds the gem. We also regenerate a static
|
63
|
+
# .gemspec file, which is useful if something (i.e. GitHub) will
|
64
|
+
# be automatically building a gem for this project. If you're not
|
65
|
+
# using GitHub, edit as appropriate.
|
66
|
+
#
|
67
|
+
# To publish your gem online, install the 'gemcutter' gem; Read more
|
68
|
+
# about that here: http://gemcutter.org/pages/gem_docs
|
69
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
70
|
+
pkg.gem_spec = spec
|
71
|
+
end
|
72
|
+
|
73
|
+
desc "Build the gemspec file #{spec.name}.gemspec"
|
74
|
+
task :gemspec do
|
75
|
+
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
|
76
|
+
File.open(file, "w") {|f| f << spec.to_ruby }
|
77
|
+
end
|
78
|
+
|
79
|
+
task :package => :gemspec
|
80
|
+
|
81
|
+
desc 'Clear out RDoc and generated packages'
|
82
|
+
task :clean => [:clobber_rdoc, :clobber_package] do
|
83
|
+
rm "#{spec.name}.gemspec"
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "Release to RubyGems.org"
|
87
|
+
task :release => :package do
|
88
|
+
system("gem push pkg/#{spec.file_name}") &&
|
89
|
+
system("git tag -a -m 'Tagged #{spec.version} release' v#{spec.version}") &&
|
90
|
+
system("git push --tags")
|
91
|
+
end
|
data/{rails/init.rb → init.rb}
RENAMED
@@ -14,7 +14,7 @@ namespace :simple_config do
|
|
14
14
|
environments << 'application'
|
15
15
|
environments.each { |env| touch("config/settings/#{env}.rb") }
|
16
16
|
|
17
|
-
cp(File.join(File.dirname(__FILE__), *%w[.. templates configuration.rb]),
|
17
|
+
cp(File.join(File.dirname(__FILE__), *%w[.. .. templates configuration.rb]),
|
18
18
|
"config/initializers/configuration.rb")
|
19
19
|
end
|
20
20
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpleconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Redpath
|
@@ -15,7 +15,7 @@ autorequire: simpleconfig
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-13 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -32,10 +32,10 @@ files:
|
|
32
32
|
- lib/simple_config/controller_mixin.rb
|
33
33
|
- lib/simple_config/utilities.rb
|
34
34
|
- lib/rails_compatibility.rb
|
35
|
-
-
|
35
|
+
- lib/tasks/simple_config.rake
|
36
|
+
- init.rb
|
36
37
|
- Rakefile
|
37
38
|
- README.textile
|
38
|
-
- tasks/simple_config.rake
|
39
39
|
- templates/configuration.rb
|
40
40
|
- test/controller_mixin_test.rb
|
41
41
|
- test/network_host_test.rb
|