Coder Social home page Coder Social logo

remarkable's People

Contributors

andersondias avatar carlosantoniodasilva avatar carlosbrando avatar chrislloyd avatar codebeige avatar dcrec1 avatar dmgk avatar jonathantron avatar josevalim avatar jqr avatar lawrencepit avatar myronmarston avatar szimek avatar vesan avatar wildchild avatar yolk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

remarkable's Issues

How about describe :xhr?

Since XHR requests are identified by header, not content type, can’t use describe mime_type to spec them. Adding this option to describe would just set:
request.env[‘HTTP_X_REQUESTED_WITH’] = ‘XMLHttpRequest’

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

  spec.license = 'MIT'
  # or
  spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

(Ruby 1.9.1) uninitialized constant Remarkable::ActiveRecord (NameError)

spec_helper.rb
...
require 'spec/autorun'
require 'spec/rails'
require 'remarkable_rails'
...

results in the following error on ruby 1.9.1

/opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in load_missing_constant': uninitialized constant Remarkable::ActiveRecord (NameError) from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:inconst_missing_with_dependencies'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/remarkable_rails-3.1.10/lib/remarkable_rails/active_orm.rb:17:in <top (required)>' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:inrequire'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/remarkable_rails-3.1.10/lib/remarkable_rails.rb:25:in<top (required)>'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:inrequire'
from /Users/user/repos/project.com/spec/spec_helper.rb:7:in <top (required)>' from /Users/user/repos/project.com/spec/models/brand_spec.rb:1:inrequire'
from /Users/user/repos/project.com/spec/models/brand_spec.rb:1:in <top (required)>' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:inload'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:in block in load_files' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:ineach'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:in load_files' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/options.rb:132:inrun_examples'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/command_line.rb:9:in run' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/bin/spec:5:in

'

should_render_template fails with partials

render_template_matcher.rb line 23:
path_and_file(response.rendered[:partials].keys.first).join(“/_”)
should be:
path_and_file(@response.rendered[:partials].keys.first).join(“/_”)

typo issue when test habtm association with conditions as hash

See the code to understand:

should_have_and_belong_to_many :watches, :class_name => 'List', :conditions => { :pvt => false }

The output:

should have and belong to many watches with class name "List" and with conditions "pvtfalse"

I think this can be:

should have and belong to many watches with class name "List" and with conditions "pvt" equal "false"

This is just a small typo detail, if you can fix it i will appreciate :)

Best regards

should_validate_numericality_of less_than/greater_than works incorrectly with floating point numbers

my_model_spec.rb:
should_validate_numericality_of :testfield, :less_than => 10.1

my_model.rb
validates_length_of :testfield, :less_than => 10.1

Gives the following error:
'MyModel should ensure numericality of testfield is less than 10.1' FAILED
Expected MyModel to be invalid when testfield is greater than 9.1

The equivalent error happens on :greater_than (but NOT on the _or_equal versions).
(A workaround for floating point numbers ending in .0 is to only specify the integer part on the validator in the model class - in this case no error appears.)

AE Support

Can it work with AE? AE supports rspec style matchers, would it be possible to use or does Remarkable have very specific RSpec related code that would prevent it from doing so?

should_belong_to fails with polymorphic associations

I found this morning that when testing for the existence of polymorphic assocations

should_belong_to :commentable, :butter, :polymorphic => true

This test passes with the existence of a commentable association, but ignores the fact that :butter doesn't exist at all. I checked the syntax as I thought perhaps options could only be used with testing single associations like so, but the documentation says otherwise.

should_belong_to :commentable, :polymorphic => true
should_belong_to :butter, :polymorphic => true

Many thanks

RobL

rspec 2 and rails 3

Já existe algum trabalho pra torna o ramarkable compatível com o rspec 2?

Use validation_reflection to speed up tests

Hello carlosbrando,

What you think about use validation_reflection gem to make the ActiveRecord validations?

This will improve speed significantly and add support for more specific options like :if and :unless (currently unsupported). Also the tests will run without querying the database.

Best regards

Support Ruby 1.9.1

Running under Ruby 1.9.1 throws the exception "uninitialized constant Remarkable::ActiveRecord".

Remarkable Rails 3.1.10 Dependent on Rails 3?

Hello,

I have an older Rails app that has a test dependency on Remarkable Rails 3.1.10. I recently tried to install the gem again and it seems to want to install Rails 3 stuff. According to the RubyGems page (https://rubygems.org/gems/remarkable_rails/versions/3.1.10) I don't see a dependency on Rails 3.

Here is the command that I ran and the output:

gem install remarkable_rails --version 3.1.10

Unable to resolve dependencies: railties requires activesupport (= 3.0.4), actionpack (= 3.0.4), activesupport (= 3.0.4), actionpack (= 3.0.4), activesupport (= 3.0.3), actionpack (= 3.0.3), activesupport (= 3.0.3), actionpack (= 3.0.3), activesupport (= 3.0.2), actionpack (= 3.0.2), activesupport (= 3.0.2), actionpack (= 3.0.2), activesupport (= 3.0.1), actionpack (= 3.0.1), activesupport (= 3.0.1), actionpack (= 3.0.1), activesupport (= 3.0.0), actionpack (= 3.0.0), activesupport (= 3.0.0), actionpack (= 3.0.0)

It used to work fine before Rails 3 came out and at this time we can't upgrade that app to Rails 3.

Is Remarkable Rails version 3.1.10 now dependent on Rails 3 and if not can this be fixed?

Cheers

Remarkable 4 and Rails 3.1.0: have_scope and have_default_scope fail

Hello,

I'm trying to write an Rspec spec of a Rails 3.1.0 model using remarkable remarkable (4.0.0.alpha4), remarkable_activemodel (4.0.0.alpha4) and remarkable_activerecord (4.0.0.alpha4) like this:

class User < ActiveRecord::Base
  default_scope :order => "#{table_name}.name ASC"
  scope :limited_fields, :select => "#{table_name}.id, #{table_name}.name, #{table_name}.info"
end

Now the spec:

require 'spec_helper'

describe User do
  describe "Named Scopes" do
    it { should have_default_scope(:order => "#{User.table_name}.name ASC") }
    it { should have_scope(:limited_fields).select("#{User.table_name}.id, #{User.table_name}.name, #{User.table_name}.info").order("#{User.table_name}.name ASC") }
  end
end

But I got 2 errors.
The first one for the default_scope:

undefined method `default_scoping' for #<Class:0x007fb5c38bf9b8>

And the second one for the scope:

Expected :limited_fields when called on User scope to SELECT users.id, users.name, users.info FROM "users"  ORDER BY users.name ASC, got SELECT users.id, users.name, users.info FROM "users"  ORDER BY users.name ASC

I'm really confused. What did I miss ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.