vex 0.2.2 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,3 +1,4 @@
1
+ CHANGELOG
1
2
  Manifest
2
3
  NOTICE.txt
3
4
  Rakefile
@@ -9,7 +10,9 @@ init.rb
9
10
  lib/nokogiri/nokogiri_ext.rb
10
11
  lib/vex.rb
11
12
  lib/vex/action_controller.rb
13
+ lib/vex/action_controller/error.rb
12
14
  lib/vex/action_controller/verify_action.rb
15
+ lib/vex/action_controller/verify_hostname.rb
13
16
  lib/vex/action_controller/whitelisted_actions.rb
14
17
  lib/vex/active_record.rb
15
18
  lib/vex/active_record/__init__.rb
@@ -0,0 +1,8 @@
1
+ IMPORTANT NOTE:
2
+ ===============
3
+
4
+ While this software is accessible to the public it is not "released in the hope someone might
5
+ find it useful." You are welcome to use and to modify it any way you like.
6
+
7
+ That means you might download and use it. Just don't expect it to work ;) And if it works
8
+ it might break between revisions.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.5
@@ -20,6 +20,18 @@ module App
20
20
  "production"
21
21
  end
22
22
  end
23
+
24
+ def self.development?
25
+ env == "development"
26
+ end
27
+
28
+ def self.production?
29
+ env == "production"
30
+ end
31
+
32
+ def self.test?
33
+ env == "test"
34
+ end
23
35
 
24
36
  def self.root
25
37
  if defined?(RAILS_ROOT)
@@ -1 +1 @@
1
- 31072.106710
1
+ 32675.106710
@@ -3,7 +3,7 @@ class LocalConf < Hash
3
3
 
4
4
  def initialize(file)
5
5
  r1 = load file.sub(/\.yml$/, ".defaults.yml")
6
- r2 = load file, App.env
6
+ r2 = load file
7
7
 
8
8
  return if r1 || r2
9
9
 
@@ -13,10 +13,18 @@ class LocalConf < Hash
13
13
 
14
14
  private
15
15
 
16
- def load(file, key = nil)
16
+ def load(file)
17
17
  data = YAML::load_file("#{App.root}/config/#{file}")
18
- data = data[key] if data && key
19
- data.each { |k,v| update k.to_sym => v } if data
18
+
19
+ data.each { |k,v| update k.to_sym => v }
20
+
21
+ if h = data["defaults"]
22
+ h.each { |k,v| update k.to_sym => v }
23
+ end
24
+ if h = data[App.env]
25
+ h.each { |k,v| update k.to_sym => v }
26
+ end
27
+
20
28
  true
21
29
  rescue Errno::ENOENT
22
30
  false
@@ -32,4 +40,4 @@ class LocalConf < Hash
32
40
  def self.method_missing(sym, *args, &block)
33
41
  App.local_conf.send sym, *args, &block
34
42
  end
35
- end if VEX_TEST == "base"
43
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{vex}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["pboy"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Vex: some ruby extensions}
11
11
  s.email = %q{eno-pboy@open-lab.org}
12
12
  s.extra_rdoc_files = ["lib/nokogiri/nokogiri_ext.rb", "lib/vex.rb", "lib/vex/action_controller.rb", "lib/vex/action_controller/verify_action.rb", "lib/vex/action_controller/whitelisted_actions.rb", "lib/vex/active_record.rb", "lib/vex/active_record/__init__.rb", "lib/vex/active_record/advisory_lock.rb", "lib/vex/active_record/advisory_lock/mysql_adapter.rb", "lib/vex/active_record/advisory_lock/sqlite_adapter.rb", "lib/vex/active_record/belongs_to_many.rb", "lib/vex/active_record/find_by_extension.rb", "lib/vex/active_record/gem.rb", "lib/vex/active_record/lite_table.rb", "lib/vex/active_record/lite_view.rb", "lib/vex/active_record/mass_load.rb", "lib/vex/active_record/mysql_backup.rb", "lib/vex/active_record/plugins/default_value_for/LICENSE.TXT", "lib/vex/active_record/plugins/default_value_for/README.rdoc", "lib/vex/active_record/plugins/default_value_for/Rakefile", "lib/vex/active_record/plugins/default_value_for/init.rb", "lib/vex/active_record/plugins/default_value_for/test.rb", "lib/vex/active_record/plugins/default_value_for/test.sqlite3", "lib/vex/active_record/random_id.rb", "lib/vex/active_record/resolver.rb", "lib/vex/active_record/serialize_hash.rb", "lib/vex/active_record/to_html.rb", "lib/vex/active_record/validate.rb", "lib/vex/active_record/validation_error_ext.rb", "lib/vex/base.rb", "lib/vex/base/app.rb", "lib/vex/base/array/at_random.rb", "lib/vex/base/array/avg.rb", "lib/vex/base/array/cross.rb", "lib/vex/base/array/each_batch.rb", "lib/vex/base/array/parallel_map.rb", "lib/vex/base/deprecation.rb", "lib/vex/base/enumerable/deep.rb", "lib/vex/base/enumerable/enumerable_ext.rb", "lib/vex/base/enumerable/progress.rb", "lib/vex/base/filesystem/fast_copy.rb", "lib/vex/base/filesystem/grep.rb", "lib/vex/base/filesystem/lock.rb", "lib/vex/base/filesystem/lock.rb.test.lck", "lib/vex/base/filesystem/lock.rb.test.pid", "lib/vex/base/filesystem/make_dirs.rb", "lib/vex/base/filesystem/parse_filename.rb", "lib/vex/base/filesystem/tmp_file.rb", "lib/vex/base/filesystem/write.rb", "lib/vex/base/hash/compact.rb", "lib/vex/base/hash/cross.rb", "lib/vex/base/hash/easy_access.rb", "lib/vex/base/hash/ensure_keys.rb", "lib/vex/base/hash/extract.rb", "lib/vex/base/hash/extras.rb", "lib/vex/base/hash/inspect.rb", "lib/vex/base/hash/simple_access_methods.rb", "lib/vex/base/invalid_argument/invalid_argument.rb", "lib/vex/base/local_conf.rb", "lib/vex/base/net/http_ext.rb", "lib/vex/base/net/socket_ext.rb", "lib/vex/base/object/insp.rb", "lib/vex/base/object/multiple_attributes.rb", "lib/vex/base/object/singleton_methods.rb", "lib/vex/base/object/with_benchmark.rb", "lib/vex/base/range_array.rb", "lib/vex/base/range_ext.rb", "lib/vex/base/safe_token.rb", "lib/vex/base/string/string_ext.rb", "lib/vex/base/system.rb", "lib/vex/base/thread/deferred.rb", "lib/vex/base/thread/sleep.rb", "lib/vex/base/time/date_ext.rb", "lib/vex/boot.rb", "lib/vex/boot/array.rb", "lib/vex/boot/blank.rb", "lib/vex/boot/string.rb", "tasks/echoe.rake", "tasks/validate_db.rake"]
13
- s.files = ["Manifest", "Rakefile", "VERSION", "config/README", "config/dependencies.rb", "config/gem.yml", "init.rb", "lib/nokogiri/nokogiri_ext.rb", "lib/vex.rb", "lib/vex/action_controller.rb", "lib/vex/action_controller/verify_action.rb", "lib/vex/action_controller/whitelisted_actions.rb", "lib/vex/active_record.rb", "lib/vex/active_record/__init__.rb", "lib/vex/active_record/advisory_lock.rb", "lib/vex/active_record/advisory_lock/mysql_adapter.rb", "lib/vex/active_record/advisory_lock/sqlite_adapter.rb", "lib/vex/active_record/belongs_to_many.rb", "lib/vex/active_record/find_by_extension.rb", "lib/vex/active_record/gem.rb", "lib/vex/active_record/lite_table.rb", "lib/vex/active_record/lite_view.rb", "lib/vex/active_record/mass_load.rb", "lib/vex/active_record/mysql_backup.rb", "lib/vex/active_record/plugins/default_value_for/LICENSE.TXT", "lib/vex/active_record/plugins/default_value_for/README.rdoc", "lib/vex/active_record/plugins/default_value_for/Rakefile", "lib/vex/active_record/plugins/default_value_for/init.rb", "lib/vex/active_record/plugins/default_value_for/test.rb", "lib/vex/active_record/plugins/default_value_for/test.sqlite3", "lib/vex/active_record/random_id.rb", "lib/vex/active_record/resolver.rb", "lib/vex/active_record/serialize_hash.rb", "lib/vex/active_record/to_html.rb", "lib/vex/active_record/validate.rb", "lib/vex/active_record/validation_error_ext.rb", "lib/vex/base.rb", "lib/vex/base/app.rb", "lib/vex/base/array/at_random.rb", "lib/vex/base/array/avg.rb", "lib/vex/base/array/cross.rb", "lib/vex/base/array/each_batch.rb", "lib/vex/base/array/parallel_map.rb", "lib/vex/base/deprecation.rb", "lib/vex/base/enumerable/deep.rb", "lib/vex/base/enumerable/enumerable_ext.rb", "lib/vex/base/enumerable/progress.rb", "lib/vex/base/filesystem/fast_copy.rb", "lib/vex/base/filesystem/grep.rb", "lib/vex/base/filesystem/lock.rb", "lib/vex/base/filesystem/lock.rb.test.lck", "lib/vex/base/filesystem/lock.rb.test.pid", "lib/vex/base/filesystem/make_dirs.rb", "lib/vex/base/filesystem/parse_filename.rb", "lib/vex/base/filesystem/tmp_file.rb", "lib/vex/base/filesystem/write.rb", "lib/vex/base/hash/compact.rb", "lib/vex/base/hash/cross.rb", "lib/vex/base/hash/easy_access.rb", "lib/vex/base/hash/ensure_keys.rb", "lib/vex/base/hash/extract.rb", "lib/vex/base/hash/extras.rb", "lib/vex/base/hash/inspect.rb", "lib/vex/base/hash/simple_access_methods.rb", "lib/vex/base/invalid_argument/invalid_argument.rb", "lib/vex/base/local_conf.rb", "lib/vex/base/net/http_ext.rb", "lib/vex/base/net/socket_ext.rb", "lib/vex/base/object/insp.rb", "lib/vex/base/object/multiple_attributes.rb", "lib/vex/base/object/singleton_methods.rb", "lib/vex/base/object/with_benchmark.rb", "lib/vex/base/range_array.rb", "lib/vex/base/range_ext.rb", "lib/vex/base/safe_token.rb", "lib/vex/base/string/string_ext.rb", "lib/vex/base/system.rb", "lib/vex/base/thread/deferred.rb", "lib/vex/base/thread/sleep.rb", "lib/vex/base/time/date_ext.rb", "lib/vex/boot.rb", "lib/vex/boot/array.rb", "lib/vex/boot/blank.rb", "lib/vex/boot/string.rb", "migration/create_request_log.rb", "script/console", "script/rebuild", "tasks/echoe.rake", "tasks/validate_db.rake", "test/ar.rb", "test/auto.rb", "test/base-tests/local_conf.rb", "test/base.rb", "test/boot.rb", "test/config/local.defaults.yml", "test/config/local.yml", "test/test_helper.rb", "vex.gemspec"]
13
+ s.files = ["Manifest", "NOTICE.txt", "Rakefile", "VERSION", "config/README", "config/dependencies.rb", "config/gem.yml", "init.rb", "lib/nokogiri/nokogiri_ext.rb", "lib/vex.rb", "lib/vex/action_controller.rb", "lib/vex/action_controller/verify_action.rb", "lib/vex/action_controller/whitelisted_actions.rb", "lib/vex/active_record.rb", "lib/vex/active_record/__init__.rb", "lib/vex/active_record/advisory_lock.rb", "lib/vex/active_record/advisory_lock/mysql_adapter.rb", "lib/vex/active_record/advisory_lock/sqlite_adapter.rb", "lib/vex/active_record/belongs_to_many.rb", "lib/vex/active_record/find_by_extension.rb", "lib/vex/active_record/gem.rb", "lib/vex/active_record/lite_table.rb", "lib/vex/active_record/lite_view.rb", "lib/vex/active_record/mass_load.rb", "lib/vex/active_record/mysql_backup.rb", "lib/vex/active_record/plugins/default_value_for/LICENSE.TXT", "lib/vex/active_record/plugins/default_value_for/README.rdoc", "lib/vex/active_record/plugins/default_value_for/Rakefile", "lib/vex/active_record/plugins/default_value_for/init.rb", "lib/vex/active_record/plugins/default_value_for/test.rb", "lib/vex/active_record/plugins/default_value_for/test.sqlite3", "lib/vex/active_record/random_id.rb", "lib/vex/active_record/resolver.rb", "lib/vex/active_record/serialize_hash.rb", "lib/vex/active_record/to_html.rb", "lib/vex/active_record/validate.rb", "lib/vex/active_record/validation_error_ext.rb", "lib/vex/base.rb", "lib/vex/base/app.rb", "lib/vex/base/array/at_random.rb", "lib/vex/base/array/avg.rb", "lib/vex/base/array/cross.rb", "lib/vex/base/array/each_batch.rb", "lib/vex/base/array/parallel_map.rb", "lib/vex/base/deprecation.rb", "lib/vex/base/enumerable/deep.rb", "lib/vex/base/enumerable/enumerable_ext.rb", "lib/vex/base/enumerable/progress.rb", "lib/vex/base/filesystem/fast_copy.rb", "lib/vex/base/filesystem/grep.rb", "lib/vex/base/filesystem/lock.rb", "lib/vex/base/filesystem/lock.rb.test.lck", "lib/vex/base/filesystem/lock.rb.test.pid", "lib/vex/base/filesystem/make_dirs.rb", "lib/vex/base/filesystem/parse_filename.rb", "lib/vex/base/filesystem/tmp_file.rb", "lib/vex/base/filesystem/write.rb", "lib/vex/base/hash/compact.rb", "lib/vex/base/hash/cross.rb", "lib/vex/base/hash/easy_access.rb", "lib/vex/base/hash/ensure_keys.rb", "lib/vex/base/hash/extract.rb", "lib/vex/base/hash/extras.rb", "lib/vex/base/hash/inspect.rb", "lib/vex/base/hash/simple_access_methods.rb", "lib/vex/base/invalid_argument/invalid_argument.rb", "lib/vex/base/local_conf.rb", "lib/vex/base/net/http_ext.rb", "lib/vex/base/net/socket_ext.rb", "lib/vex/base/object/insp.rb", "lib/vex/base/object/multiple_attributes.rb", "lib/vex/base/object/singleton_methods.rb", "lib/vex/base/object/with_benchmark.rb", "lib/vex/base/range_array.rb", "lib/vex/base/range_ext.rb", "lib/vex/base/safe_token.rb", "lib/vex/base/string/string_ext.rb", "lib/vex/base/system.rb", "lib/vex/base/thread/deferred.rb", "lib/vex/base/thread/sleep.rb", "lib/vex/base/time/date_ext.rb", "lib/vex/boot.rb", "lib/vex/boot/array.rb", "lib/vex/boot/blank.rb", "lib/vex/boot/string.rb", "migration/create_request_log.rb", "script/console", "script/rebuild", "tasks/echoe.rake", "tasks/validate_db.rake", "test/ar.rb", "test/auto.rb", "test/base-tests/local_conf.rb", "test/base.rb", "test/boot.rb", "test/config/local.defaults.yml", "test/config/local.yml", "test/test_helper.rb", "vex.gemspec"]
14
14
  s.homepage = %q{http://github.com/pboy/vex}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Vex"]
16
16
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - pboy
@@ -150,6 +150,7 @@ extra_rdoc_files:
150
150
  - tasks/validate_db.rake
151
151
  files:
152
152
  - Manifest
153
+ - NOTICE.txt
153
154
  - Rakefile
154
155
  - VERSION
155
156
  - config/README