Browse Source

various fixes

pull/1/head
Nicolae Claudius 10 years ago
parent
commit
0ee2bd35cc
  1. 52
      Gemfile
  2. 299
      Gemfile.lock
  3. 4
      app/assets/javascripts/components/behaviors.js.coffee
  4. 1
      app/assets/javascripts/components/webshims.js.coffee
  5. 1
      app/assets/stylesheets/application.css.scss
  6. 18
      app/models/domain/tree_structure.rb
  7. 2
      app/validators/hostname2_validator.rb
  8. 6
      config/initializers/active_scaffold.rb
  9. 4
      db/schema.rb
  10. 18
      spec/models/tld_spec.rb
  11. 2
      spec/support/rspec.rb

52
Gemfile

@ -1,7 +1,7 @@
source 'http://rubygems.org'
# Core
gem 'rails', '4.0.3'
gem 'rails', '4.1.8'
gem 'mysql2', '~> 0.3.13'
# Auth
@ -12,13 +12,13 @@ gem 'cancan', '= 1.6.7'
gem 'switch_user', '~> 0.9.3'
# ActiveRecord
gem 'squeel', '~> 1.1.0'
gem 'squeel', '~> 1.2.1'
gem 'sentient_model', '~> 1.0.4'
gem 'nilify_blanks', '~> 1.0.2'
gem 'active-model-email-validator', '~> 1.0.2'
gem 'nilify_blanks', '~> 1.1.0'
gem 'valid_email2', '~> 1.1.1'
gem 'concerned_with', '~> 0.1.0'
gem 'faker','~> 1.3.0'
gem 'factory_girl_rails', '~> 4.4.1'
gem 'faker','~> 1.4.2'
gem 'factory_girl_rails', '~> 4.5.0'
gem 'validates_hostname', '~> 1.0.0', github: 'KimNorgaard/validates_hostname'
gem 'paper_trail', '~> 3.0.0'
@ -27,10 +27,10 @@ gem 'mail_form', '~> 1.5.0'
gem 'simple_form', '~> 3.0.2'
gem 'navigasmic', '~> 0.5.6', github: 'jejacks0n/navigasmic',
tag: 'v0.5.6', ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a'
gem 'active_scaffold', '~> 3.4.0.rc',
github: 'clyfe/active_scaffold'
gem 'active_scaffold', '~> 3.4.9'
# github: 'clyfe/active_scaffold'
# path: '/home/clyfe/dev/active_scaffold'
#branch: 'fix-always-use-build_associated'
# branch: 'fix-always-use-build_associated'
# Config
gem 'rails_config', '~> 0.4.2'
@ -42,38 +42,40 @@ gem 'seedbank', '~> 0.3.0'
gem 'unicorn', '~> 4.8.3'
gem 'dalli', '~> 2.7.0'
gem 'json', '~> 1.8.0'
gem 'rails_admin', '~> 0.6.1'
gem 'aws-ses', '~> 0.5.0', :require => 'aws/ses'
gem 'rails_admin', '~> 0.6.3'
gem 'aws-ses', '~> 0.6.0', :require => 'aws/ses'
# Assets
gem 'uglifier', '~> 2.4.0'
gem 'uglifier', '~> 2.5.3'
gem 'oily_png', '~> 1.1.0'
gem 'therubyracer', '~> 0.12.0'
gem 'sass-rails', '~> 4.0.0'
gem 'compass-rails', '~> 1.1.0'
gem 'bootstrap-sass', '~> 3.1.1.0'
gem 'font-awesome-rails', '~> 4.1.0.0'
gem 'webshims-rails', '~> 1.12.2'
gem 'sass-rails', '~> 4.0.4'
gem 'compass-rails', '~> 2.0.0'
gem 'bootstrap-sass', '~> 3.3.1.0'
gem 'font-awesome-rails', '~> 4.2.0.0'
gem 'webshims-rails', '~> 1.15.4'
gem 'detect_timezone_rails', '~> 0.0.3'
gem 'coffee-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails', '~> 3.1.0'
gem 'jquery-ui-rails', '~> 4.2.0'
gem 'turbolinks', '~> 2.2.1'
gem 'turbolinks', '~> 2.5.2'
group :development do
gem 'quiet_assets', '~> 1.0.1'
gem 'better_errors', '1.1.0'
gem 'better_errors', '2.0.0'
gem 'binding_of_caller', '0.7.2'
gem 'debase', '~> 0.0.7'
gem 'bullet', '~> 4.9.0'
gem 'debase', '~> 0.1.0'
gem 'bullet', '~> 4.14.0'
gem 'letter_opener', '~> 1.2.0'
end
group :test, :development do
gem 'rspec-rails', '~> 2.14.0'
gem 'rspec-rails', '~> 3.1.0'
gem 'rspec-its', '~> 1.1.0'
gem 'rspec-collection_matchers', '~> 1.1.2'
end
group :test do
gem 'capybara', '~> 2.2.0'
gem 'database_rewinder', '~> 0.2.0'
gem 'capybara', '~> 2.4.1'
gem 'database_rewinder', '~> 0.4.1'
end

299
Gemfile.lock

@ -9,13 +9,6 @@ GIT
rspec-rails
sqlite3-ruby
GIT
remote: git://github.com/clyfe/active_scaffold.git
revision: 72f6cbdfce7661a29e5517e4562fb7a009826976
specs:
active_scaffold (3.4.0.rc)
rails (>= 3.2.6, < 5)
GIT
remote: git://github.com/jejacks0n/navigasmic.git
revision: 1ffe437f279657c6fb87bb4b0215eb723df4ea7a
@ -27,86 +20,87 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.0.3)
actionpack (= 4.0.3)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
erubis (~> 2.7.0)
actionmailer (4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.8)
actionview (= 4.1.8)
activesupport (= 4.1.8)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
active-model-email-validator (1.0.2)
activemodel
mail
activemodel (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
activerecord (4.0.3)
activemodel (= 4.0.3)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.3)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
actionview (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
erubis (~> 2.7.0)
active_scaffold (3.4.9)
rails (>= 3.2.18, < 5)
activemodel (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
activerecord (4.1.8)
activemodel (= 4.1.8)
activesupport (= 4.1.8)
arel (~> 5.0.0)
activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
tzinfo (~> 1.1)
acts_as_nested_interval (0.1.1)
rails (>= 3.2.1, < 5)
addressable (2.3.6)
arel (4.0.2)
aws-ses (0.5.0)
arel (5.0.1.20140414130214)
aws-ses (0.6.0)
builder
mail (> 2.2.5)
mime-types
xml-simple
bcrypt (3.1.7)
bcrypt (3.1.9)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
better_errors (1.1.0)
better_errors (2.0.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.1.1.1)
bootstrap-sass (3.3.1.0)
sass (~> 3.2)
builder (3.1.4)
bullet (4.9.0)
activesupport
uniform_notifier (~> 1.6.0)
builder (3.2.2)
bullet (4.14.0)
activesupport (>= 3.0.0)
uniform_notifier (>= 1.6.0)
cancan (1.6.7)
capybara (2.2.1)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chunky_png (1.3.1)
chunky_png (1.3.3)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
compass (0.12.6)
coffee-script-source (1.8.0)
compass (0.12.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.2.19)
compass-rails (1.1.7)
compass-rails (2.0.0)
compass (>= 0.12.2)
sprockets (<= 2.11.0)
concerned_with (0.1.0)
dalli (2.7.2)
database_rewinder (0.2.0)
debase (0.0.9)
debugger-ruby_core_source
database_rewinder (0.4.1)
debase (0.1.0)
debase-ruby_core_source
debase-ruby_core_source (0.7.2)
debug_inspector (0.0.2)
debugger-ruby_core_source (1.3.5)
detect_timezone_rails (0.0.5)
railties (>= 3.1)
devise (3.1.2)
@ -117,25 +111,25 @@ GEM
warden (~> 1.2.3)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.2.0)
factory_girl (4.4.0)
execjs (2.2.2)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faker (1.3.0)
faker (1.4.3)
i18n (~> 0.5)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
font-awesome-rails (4.1.0.0)
font-awesome-rails (4.2.0.0)
railties (>= 3.2, < 5.0)
fssm (0.2.10)
haml (4.0.5)
tilt
hashie (2.1.2)
hashie (3.3.1)
hike (1.2.3)
i18n (0.6.9)
jquery-rails (3.1.1)
i18n (0.6.11)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.2.1)
@ -146,11 +140,11 @@ GEM
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.2)
launchy (2.4.2)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.2.0)
launchy (~> 2.2)
libv8 (3.16.14.3)
libv8 (3.16.14.7)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@ -158,63 +152,65 @@ GEM
actionmailer (>= 3.2, < 5)
activemodel (>= 3.2, < 5)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (4.7.5)
mini_portile (0.6.1)
minitest (5.4.3)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
mysql2 (0.3.16)
mysql2 (0.3.17)
nested_form (0.3.2)
nilify_blanks (1.0.3)
nilify_blanks (1.1.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
oauth2 (0.9.4)
nokogiri (1.6.4.1)
mini_portile (~> 0.6.0)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
oily_png (1.1.1)
chunky_png (~> 1.3.0)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
oily_png (1.1.2)
chunky_png (~> 1.3.1)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-google-oauth2 (0.2.4)
omniauth (~> 1.0)
omniauth-google-oauth2 (0.2.6)
omniauth (> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
omniauth-oauth2 (1.2.0)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
oauth2 (~> 1.0)
omniauth (~> 1.2)
orm_adapter (0.5.0)
paper_trail (3.0.2)
paper_trail (3.0.6)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
polyamorous (0.6.4)
polyamorous (1.1.0)
activerecord (>= 3.0)
polyglot (0.3.5)
quiet_assets (1.0.3)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack-pjax (0.7.0)
rack-pjax (0.8.0)
nokogiri (~> 1.5)
rack (~> 1.3)
rack (~> 1.1)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.3)
actionmailer (= 4.0.3)
actionpack (= 4.0.3)
activerecord (= 4.0.3)
activesupport (= 4.0.3)
rails (4.1.8)
actionmailer (= 4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
activemodel (= 4.1.8)
activerecord (= 4.1.8)
activesupport (= 4.1.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.3)
sprockets-rails (~> 2.0.0)
railties (= 4.1.8)
sprockets-rails (~> 2.0)
rails-settings-cached (0.4.1)
rails (>= 4.0.0)
rails_admin (0.6.2)
rails_admin (0.6.3)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0)
@ -230,37 +226,46 @@ GEM
sass-rails (~> 4.0)
rails_config (0.4.2)
activesupport (>= 3.0)
railties (4.0.3)
actionpack (= 4.0.3)
activesupport (= 4.0.3)
railties (4.1.8)
actionpack (= 4.1.8)
activesupport (= 4.1.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.2)
ref (1.0.5)
remotipart (1.2.1)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rspec-rails (2.14.2)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-collection_matchers (1.1.2)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-its (1.1.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-rails (3.1.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
safe_yaml (1.0.3)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
safe_yaml (1.0.4)
sass (3.2.19)
sass-rails (4.0.3)
sass-rails (4.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 2.12)
sprockets-rails (~> 2.0)
seedbank (0.3.0)
sentient_model (1.0.4)
@ -268,22 +273,22 @@ GEM
simple_form (3.0.2)
actionpack (~> 4.0)
activemodel (~> 4.0)
sprockets (2.11.0)
sprockets (2.11.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
sprockets-rails (2.2.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
squeel (1.1.1)
squeel (1.2.1)
activerecord (>= 3.0)
activesupport (>= 3.0)
polyamorous (~> 0.6.0)
polyamorous (~> 1.1.0)
switch_user (0.9.5)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
@ -294,10 +299,11 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
turbolinks (2.5.2)
coffee-rails
tzinfo (0.3.39)
uglifier (2.4.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.8.3)
@ -305,11 +311,14 @@ GEM
rack
raindrops (~> 0.7)
uniform_notifier (1.6.2)
valid_email2 (1.1.1)
activemodel (>= 3.2)
mail (~> 2.5.4)
warden (1.2.3)
rack (>= 1.0)
webshims-rails (1.12.7)
webshims-rails (1.15.4)
rails (> 3.1.0)
xml-simple (1.1.3)
xml-simple (1.1.4)
xpath (2.0.0)
nokogiri (~> 1.3)
@ -317,27 +326,26 @@ PLATFORMS
ruby
DEPENDENCIES
active-model-email-validator (~> 1.0.2)
active_scaffold (~> 3.4.0.rc)!
active_scaffold (~> 3.4.9)
acts_as_nested_interval (~> 0.1.1)
aws-ses (~> 0.5.0)
better_errors (= 1.1.0)
aws-ses (~> 0.6.0)
better_errors (= 2.0.0)
binding_of_caller (= 0.7.2)
bootstrap-sass (~> 3.1.1.0)
bullet (~> 4.9.0)
bootstrap-sass (~> 3.3.1.0)
bullet (~> 4.14.0)
cancan (= 1.6.7)
capybara (~> 2.2.0)
coffee-rails (~> 4.0.0)
compass-rails (~> 1.1.0)
capybara (~> 2.4.1)
coffee-rails (~> 4.1.0)
compass-rails (~> 2.0.0)
concerned_with (~> 0.1.0)
dalli (~> 2.7.0)
database_rewinder (~> 0.2.0)
debase (~> 0.0.7)
database_rewinder (~> 0.4.1)
debase (~> 0.1.0)
detect_timezone_rails (~> 0.0.3)
devise (~> 3.1.1)
factory_girl_rails (~> 4.4.1)
faker (~> 1.3.0)
font-awesome-rails (~> 4.1.0.0)
factory_girl_rails (~> 4.5.0)
faker (~> 1.4.2)
font-awesome-rails (~> 4.2.0.0)
jquery-rails (~> 3.1.0)
jquery-ui-rails (~> 4.2.0)
json (~> 1.8.0)
@ -345,26 +353,29 @@ DEPENDENCIES
mail_form (~> 1.5.0)
mysql2 (~> 0.3.13)
navigasmic (~> 0.5.6)!
nilify_blanks (~> 1.0.2)
nilify_blanks (~> 1.1.0)
oily_png (~> 1.1.0)
omniauth (~> 1.2.1)
omniauth-google-oauth2 (~> 0.2.2)
paper_trail (~> 3.0.0)
quiet_assets (~> 1.0.1)
rails (= 4.0.3)
rails (= 4.1.8)
rails-settings-cached (~> 0.4.0)
rails_admin (~> 0.6.1)
rails_admin (~> 0.6.3)
rails_config (~> 0.4.2)
rspec-rails (~> 2.14.0)
sass-rails (~> 4.0.0)
rspec-collection_matchers (~> 1.1.2)
rspec-its (~> 1.1.0)
rspec-rails (~> 3.1.0)
sass-rails (~> 4.0.4)
seedbank (~> 0.3.0)
sentient_model (~> 1.0.4)
simple_form (~> 3.0.2)
squeel (~> 1.1.0)
squeel (~> 1.2.1)
switch_user (~> 0.9.3)
therubyracer (~> 0.12.0)
turbolinks (~> 2.2.1)
uglifier (~> 2.4.0)
turbolinks (~> 2.5.2)
uglifier (~> 2.5.3)
unicorn (~> 4.8.3)
valid_email2 (~> 1.1.1)
validates_hostname (~> 1.0.0)!
webshims-rails (~> 1.12.2)
webshims-rails (~> 1.15.4)

4
app/assets/javascripts/components/behaviors.js.coffee

@ -4,7 +4,3 @@ $document.on 'mouseenter', '[rel=tooltip]', -> $(@).tooltip('show')
$document.on 'mouseleave', '[rel=tooltip]', -> $(@).tooltip('hide')
$document.popover(selector: '[rel=popover]', trigger: 'hover', html: true)
$document.on 'page:fetch', -> NProgress.start()
$document.on 'page:change', -> NProgress.done()
$document.on 'page:restore', -> NProgress.remove()

1
app/assets/javascripts/components/webshims.js.coffee

@ -1,4 +1,3 @@
#= require webshims/extras/modernizr-custom
#= require webshims/polyfiller
$.webshims.setOptions('basePath', '/assets/webshims/shims/')

1
app/assets/stylesheets/application.css.scss

@ -13,6 +13,7 @@ $carousel-indicator-border-color: #333;
$carousel-indicator-active-bg: #333;
$grid-float-breakpoint: 992px;
@import "bootstrap-sprockets";
@import "bootstrap";
@import "bootstrap/theme";
@import "active_scaffold";

18
app/models/domain/tree_structure.rb

@ -1,4 +1,6 @@
class Domain < ActiveRecord::Base
include ActsAsNestedInterval
attr_accessor :parent_synced
# this goes before acts_as_nested_interval call
@ -10,7 +12,7 @@ class Domain < ActiveRecord::Base
after_save :sync_children
# this goes after sync_parent, to order callbacks correctly
acts_as_nested_interval virtual_root: true
acts_as_nested_interval virtual_root: true, dependent: :nullify
validate :domain_ownership
def domain_ownership
@ -60,6 +62,20 @@ class Domain < ActiveRecord::Base
self.parent = parent_domain if !@parent_synced && new_parent?
end
# acts_as_nested_interval monkeypatch for lock
def update_nested_interval
changed = send(:"#{nested_interval_foreign_key}_changed?")
if !changed
db_self = self.class.lock(true).find(id)
write_attribute(nested_interval_foreign_key, db_self.read_attribute(nested_interval_foreign_key))
set_nested_interval db_self.lftp, db_self.lftq
else
# No locking in this case -- caller should have acquired table lock.
update_nested_interval_move
end
end
def connection; self.class.connection end
protected
def new_parent?

2
app/validators/hostname2_validator.rb

@ -5,7 +5,7 @@ class Hostname2Validator < PAK::ValidatesHostname::HostnameValidator
opts = {
:allow_underscore => true,
:require_valid_tld => false,
:valid_tlds => ALLOWED_TLDS,
:valid_tlds => PAK::ValidatesHostname::ALLOWED_TLDS,
:allow_numeric_hostname => true,
:allow_wildcard_hostname => false
}.merge(options)

6
config/initializers/active_scaffold.rb

@ -7,3 +7,9 @@ ActiveScaffold.set_defaults do |conf|
# conf.cache_action_link_urls = false
ActiveScaffold::Config::Mark.mark_all_mode = :page
end
ActiveScaffold::Bridges::PaperTrail.instance_eval do
def install?
false
end
end

4
db/schema.rb

@ -69,8 +69,8 @@ ActiveRecord::Schema.define(version: 20140526093613) do
t.integer "lftq", default: 0, null: false
t.integer "rgtp", default: 0, null: false
t.integer "rgtq", default: 0, null: false
t.float "lft", null: false
t.float "rgt", null: false
t.float "lft", limit: 53, null: false
t.float "rgt", limit: 53, null: false
end
add_index "domains", ["lft"], name: "index_domains_on_lft", using: :btree

18
spec/models/tld_spec.rb

@ -7,16 +7,16 @@ describe Tld do
end
its ".include" do
Tld.include?('ro').should be_true
Tld.include?('lt').should be_true
Tld.include?('co.uk').should be_true
Tld.include?('com.au').should be_true
Tld.include?('ANYTHING.ar').should be_true
Tld.include?('pref.fukuoka.jp').should be_true
Tld.include?('any.toyama.jp').should be_true
Tld.include?('ro').should be_truthy
Tld.include?('lt').should be_truthy
Tld.include?('co.uk').should be_truthy
Tld.include?('com.au').should be_truthy
Tld.include?('ANYTHING.ar').should be_truthy
Tld.include?('pref.fukuoka.jp').should be_truthy
Tld.include?('any.toyama.jp').should be_truthy
Tld.include?('clyfe.ro').should be_false
Tld.include?('clyfe.zooz.lt').should be_false
Tld.include?('clyfe.ro').should be_falsey
Tld.include?('clyfe.zooz.lt').should be_falsey
end
end

2
spec/support/rspec.rb

@ -9,4 +9,6 @@ RSpec.configure do |config|
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
config.order = "random"
config.infer_spec_type_from_file_location!
end

Loading…
Cancel
Save