sortability 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +2 -0
  4. data/Rakefile +18 -0
  5. data/lib/sortability.rb +6 -0
  6. data/lib/sortability/active_record/base.rb +170 -0
  7. data/lib/sortability/active_record/connection_adapters/table_definition.rb +18 -0
  8. data/lib/sortability/active_record/migration.rb +25 -0
  9. data/lib/sortability/version.rb +3 -0
  10. data/spec/dummy/README.md +4 -0
  11. data/spec/dummy/Rakefile +6 -0
  12. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  13. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  14. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  15. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  16. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  17. data/spec/dummy/bin/bundle +3 -0
  18. data/spec/dummy/bin/rails +4 -0
  19. data/spec/dummy/bin/rake +4 -0
  20. data/spec/dummy/config.ru +4 -0
  21. data/spec/dummy/config/application.rb +22 -0
  22. data/spec/dummy/config/boot.rb +5 -0
  23. data/spec/dummy/config/database.yml +25 -0
  24. data/spec/dummy/config/environment.rb +5 -0
  25. data/spec/dummy/config/environments/development.rb +37 -0
  26. data/spec/dummy/config/environments/production.rb +78 -0
  27. data/spec/dummy/config/environments/test.rb +39 -0
  28. data/spec/dummy/config/initializers/assets.rb +8 -0
  29. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  30. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  31. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  32. data/spec/dummy/config/initializers/inflections.rb +16 -0
  33. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  34. data/spec/dummy/config/initializers/session_store.rb +3 -0
  35. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  36. data/spec/dummy/config/locales/en.yml +23 -0
  37. data/spec/dummy/config/routes.rb +56 -0
  38. data/spec/dummy/config/secrets.yml +22 -0
  39. data/spec/dummy/db/test.sqlite3 +0 -0
  40. data/spec/dummy/log/development.log +0 -0
  41. data/spec/dummy/log/test.log +0 -0
  42. data/spec/dummy/public/404.html +67 -0
  43. data/spec/dummy/public/422.html +67 -0
  44. data/spec/dummy/public/500.html +66 -0
  45. data/spec/dummy/public/favicon.ico +0 -0
  46. data/spec/lib/sortability/active_record/base_spec.rb +9 -0
  47. data/spec/lib/sortability/active_record/connection_adapters/table_definition_spec.rb +11 -0
  48. data/spec/lib/sortability/active_record/migration_spec.rb +9 -0
  49. data/spec/rails_helper.rb +51 -0
  50. data/spec/spec_helper.rb +87 -0
  51. metadata +178 -0
File without changes
@@ -0,0 +1,9 @@
1
+ require "rails_helper"
2
+
3
+ module Sortability
4
+ module ActiveRecord
5
+ RSpec.describe Base do
6
+ pending "add some examples to (or delete) #{__FILE__}"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ require "rails_helper"
2
+
3
+ module Sortability
4
+ module ActiveRecord
5
+ module ConnectionAdapters
6
+ RSpec.describe TableDefinition do
7
+ pending "add some examples to (or delete) #{__FILE__}"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ require "rails_helper"
2
+
3
+ module Sortability
4
+ module ActiveRecord
5
+ RSpec.describe Migration do
6
+ pending "add some examples to (or delete) #{__FILE__}"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,51 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require 'spec_helper'
4
+ require File.expand_path("../dummy/config/environment", __FILE__)
5
+ require 'rspec/rails'
6
+ require 'rspec/autorun'
7
+ # Add additional requires below this line. Rails is not loaded until this point!
8
+
9
+ # Requires supporting ruby files with custom matchers and macros, etc, in
10
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
11
+ # run as spec files by default. This means that files in spec/support that end
12
+ # in _spec.rb will both be required and run as specs, causing the specs to be
13
+ # run twice. It is recommended that you do not name files matching this glob to
14
+ # end with _spec.rb. You can configure this pattern with the --pattern
15
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
16
+ #
17
+ # The following line is provided for convenience purposes. It has the downside
18
+ # of increasing the boot-up time by auto-requiring all files in the support
19
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
20
+ # require only the support files necessary.
21
+ #
22
+ # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
23
+
24
+ # Checks for pending migrations before tests are run.
25
+ # If you are not using ActiveRecord, you can remove this line.
26
+ ActiveRecord::Migration.maintain_test_schema!
27
+
28
+ RSpec.configure do |config|
29
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
30
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
31
+
32
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
33
+ # examples within a transaction, remove the following line or assign false
34
+ # instead of true.
35
+ config.use_transactional_fixtures = true
36
+
37
+ # RSpec Rails can automatically mix in different behaviours to your tests
38
+ # based on their file location, for example enabling you to call `get` and
39
+ # `post` in specs under `spec/controllers`.
40
+ #
41
+ # You can disable this behaviour by removing the line below, and instead
42
+ # explicitly tag your specs with their type, e.g.:
43
+ #
44
+ # RSpec.describe UsersController, :type => :controller do
45
+ # # ...
46
+ # end
47
+ #
48
+ # The different available types are documented in the features, such as in
49
+ # https://relishapp.com/rspec/rspec-rails/docs
50
+ config.infer_spec_type_from_file_location!
51
+ end
@@ -0,0 +1,87 @@
1
+ require 'rspec/core'
2
+
3
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
6
+ # file to always be loaded, without a need to explicitly require it in any files.
7
+ #
8
+ # Given that it is always loaded, you are encouraged to keep this file as
9
+ # light-weight as possible. Requiring heavyweight dependencies from this file
10
+ # will add to the boot time of your test suite on EVERY test run, even for an
11
+ # individual file that may not need all of that loaded. Instead, consider making
12
+ # a separate helper file that requires the additional dependencies and performs
13
+ # the additional setup, and require it from the spec files that actually need it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
54
+ # For more details, see:
55
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
56
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
57
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
58
+ config.disable_monkey_patching!
59
+
60
+ # Many RSpec users commonly either run the entire suite or an individual
61
+ # file, and it's useful to allow more verbose output when running an
62
+ # individual spec file.
63
+ if config.files_to_run.one?
64
+ # Use the documentation formatter for detailed output,
65
+ # unless a formatter has already been configured
66
+ # (e.g. via a command-line flag).
67
+ config.default_formatter = 'doc'
68
+ end
69
+
70
+ # Print the 10 slowest examples and example groups at the
71
+ # end of the spec run, to help surface which specs are running
72
+ # particularly slow.
73
+ config.profile_examples = 10
74
+
75
+ # Run specs in random order to surface order dependencies. If you find an
76
+ # order dependency and want to debug it, you can fix the order by providing
77
+ # the seed, which is printed after each run.
78
+ # --seed 1234
79
+ config.order = :random
80
+
81
+ # Seed global randomization in this process using the `--seed` CLI option.
82
+ # Setting this allows you to use `--seed` to deterministically reproduce
83
+ # test failures related to randomization by passing the same `--seed` value
84
+ # as the one that triggered the failure.
85
+ Kernel.srand config.seed
86
+ =end
87
+ end
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sortability
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Dante Soares
8
+ - JP Slavinsky
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-12-04 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: sqlite3
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec-rails
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ description: Provides ActiveRecord methods that make it easy to allow users to reorder
57
+ records
58
+ email:
59
+ - Dante.M.Soares@rice.edu
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - MIT-LICENSE
65
+ - README.md
66
+ - Rakefile
67
+ - lib/sortability.rb
68
+ - lib/sortability/active_record/base.rb
69
+ - lib/sortability/active_record/connection_adapters/table_definition.rb
70
+ - lib/sortability/active_record/migration.rb
71
+ - lib/sortability/version.rb
72
+ - spec/dummy/README.md
73
+ - spec/dummy/Rakefile
74
+ - spec/dummy/app/assets/javascripts/application.js
75
+ - spec/dummy/app/assets/stylesheets/application.css
76
+ - spec/dummy/app/controllers/application_controller.rb
77
+ - spec/dummy/app/helpers/application_helper.rb
78
+ - spec/dummy/app/views/layouts/application.html.erb
79
+ - spec/dummy/bin/bundle
80
+ - spec/dummy/bin/rails
81
+ - spec/dummy/bin/rake
82
+ - spec/dummy/config.ru
83
+ - spec/dummy/config/application.rb
84
+ - spec/dummy/config/boot.rb
85
+ - spec/dummy/config/database.yml
86
+ - spec/dummy/config/environment.rb
87
+ - spec/dummy/config/environments/development.rb
88
+ - spec/dummy/config/environments/production.rb
89
+ - spec/dummy/config/environments/test.rb
90
+ - spec/dummy/config/initializers/assets.rb
91
+ - spec/dummy/config/initializers/backtrace_silencers.rb
92
+ - spec/dummy/config/initializers/cookies_serializer.rb
93
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
94
+ - spec/dummy/config/initializers/inflections.rb
95
+ - spec/dummy/config/initializers/mime_types.rb
96
+ - spec/dummy/config/initializers/session_store.rb
97
+ - spec/dummy/config/initializers/wrap_parameters.rb
98
+ - spec/dummy/config/locales/en.yml
99
+ - spec/dummy/config/routes.rb
100
+ - spec/dummy/config/secrets.yml
101
+ - spec/dummy/db/test.sqlite3
102
+ - spec/dummy/log/development.log
103
+ - spec/dummy/log/test.log
104
+ - spec/dummy/public/404.html
105
+ - spec/dummy/public/422.html
106
+ - spec/dummy/public/500.html
107
+ - spec/dummy/public/favicon.ico
108
+ - spec/lib/sortability/active_record/base_spec.rb
109
+ - spec/lib/sortability/active_record/connection_adapters/table_definition_spec.rb
110
+ - spec/lib/sortability/active_record/migration_spec.rb
111
+ - spec/rails_helper.rb
112
+ - spec/spec_helper.rb
113
+ homepage: https://github.com/openstax/sortability
114
+ licenses:
115
+ - MIT
116
+ metadata: {}
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubyforge_project:
133
+ rubygems_version: 2.2.2
134
+ signing_key:
135
+ specification_version: 4
136
+ summary: Rails gem that provides easy to use ordered records
137
+ test_files:
138
+ - spec/dummy/app/assets/javascripts/application.js
139
+ - spec/dummy/app/assets/stylesheets/application.css
140
+ - spec/dummy/app/controllers/application_controller.rb
141
+ - spec/dummy/app/helpers/application_helper.rb
142
+ - spec/dummy/app/views/layouts/application.html.erb
143
+ - spec/dummy/bin/bundle
144
+ - spec/dummy/bin/rails
145
+ - spec/dummy/bin/rake
146
+ - spec/dummy/config/application.rb
147
+ - spec/dummy/config/boot.rb
148
+ - spec/dummy/config/database.yml
149
+ - spec/dummy/config/environment.rb
150
+ - spec/dummy/config/environments/development.rb
151
+ - spec/dummy/config/environments/production.rb
152
+ - spec/dummy/config/environments/test.rb
153
+ - spec/dummy/config/initializers/assets.rb
154
+ - spec/dummy/config/initializers/backtrace_silencers.rb
155
+ - spec/dummy/config/initializers/cookies_serializer.rb
156
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
157
+ - spec/dummy/config/initializers/inflections.rb
158
+ - spec/dummy/config/initializers/mime_types.rb
159
+ - spec/dummy/config/initializers/session_store.rb
160
+ - spec/dummy/config/initializers/wrap_parameters.rb
161
+ - spec/dummy/config/locales/en.yml
162
+ - spec/dummy/config/routes.rb
163
+ - spec/dummy/config/secrets.yml
164
+ - spec/dummy/config.ru
165
+ - spec/dummy/db/test.sqlite3
166
+ - spec/dummy/log/development.log
167
+ - spec/dummy/log/test.log
168
+ - spec/dummy/public/404.html
169
+ - spec/dummy/public/422.html
170
+ - spec/dummy/public/500.html
171
+ - spec/dummy/public/favicon.ico
172
+ - spec/dummy/Rakefile
173
+ - spec/dummy/README.md
174
+ - spec/lib/sortability/active_record/base_spec.rb
175
+ - spec/lib/sortability/active_record/connection_adapters/table_definition_spec.rb
176
+ - spec/lib/sortability/active_record/migration_spec.rb
177
+ - spec/rails_helper.rb
178
+ - spec/spec_helper.rb