GithubHelp home page GithubHelp logo

fig_newton's People

Contributors

cheezy avatar dmorgan3405 avatar peterhartman avatar thespartan1980 avatar tk8817 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fig_newton's Issues

Can't run specs

cloned and ran bundle_install - seems to be having trouble with yml_reader, which is installed..

$ rake spec
/Users/stevejackson/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -I lib:spec -S rspec spec/fig_newton/fig_newton_spec.rb

An error occurred 
  NameError: uninitialized constant YmlReader::YAML
  occurred at /Users/stevejackson/.rvm/gems/ruby-1.9.3-p194@data_magic/gems/yml_reader-0.2/lib/yml_reader.rb:26:in `load'


An error occurred 
  NameError: uninitialized constant YmlReader::YAML
  occurred at /Users/stevejackson/.rvm/gems/ruby-1.9.3-p194@data_magic/gems/yml_reader-0.2/lib/yml_reader.rb:26:in `load'


Finished in 0.00116 seconds
3 examples, 3 failures

$ gem list

*** LOCAL GEMS ***

builder (3.1.4)
bundler (1.1.3)
coderay (1.0.8)
cucumber (1.2.1)
diff-lcs (1.1.3)
fuubar (1.1.0)
fuubar-cucumber (0.0.18)
gherkin (2.11.5)
growl (1.0.3)
guard (1.5.4)
guard-cucumber (1.2.2)
guard-rspec (2.1.1)
json (1.7.5)
listen (0.5.3)
lumberjack (1.0.2)
method_source (0.8.1)
pry (0.9.10)
rake (10.0.0, 0.9.2.2)
rb-fsevent (0.9.2)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
rspec-instafail (0.2.4)
rspec-mocks (2.11.3)
ruby-progressbar (1.0.2)
rubygems-bundler (0.9.0)
rvm (1.11.3.3)
slop (3.3.3)
thor (0.16.0)
yml_reader (0.2)

undefined method `password' for FigNewton:Module (NoMethodError)

I get an undefined method error if I use a null or empty value in an environment file:

      undefined method `password' for FigNewton:Module (NoMethodError)
      ./lib/pages/login_page.rb:10:in `login_to_system'
      ./features/step_definitions/login_steps.rb:14:in `/^I logged into the portal$/'
      .\features\begin_test_setup.feature:4:in `Given I logged into the portal'
class LoginPage
  include PageObject

  page_url FigNewton.base_url + '//login.html'

  text_field(:username, :name => 'j_username')
  text_field(:password, :name => 'j_password')
  button(:login, :id => 'button')

  def login_to_system(username = FigNewton.username, password = FigNewton.password)
    self.username = username
    self.password = (password.nil? ? Settings.environment_password : password)

    login

    worklist = WorklistPage.new(@browser)
    worklist.wait_to_load
  end
end
base_url: http://awebsite.com:8080/

username: regular
password: ~

I'd like to be able to use null values if possible, using '' just doesn't work as well

ERB processing only applies to FigNewton.load('filename')

Hey @cheezy , I noticed today that loading via ENV does not support ERB. When you use FigNewton.load, the YAML is handled by your yml_reader gem which does ERB interpolation. When you use ENV['FIG_NEWTON_FILE'], FigNewton loads the yaml within itself and that method has no ERB interpolation.

I would suggest that FigNewton always call the yml_reader .load method to ensure parity regardless of entry point. yml_reader is included as a dependancy on FigNewton so this should be a quick win.

# ERB processed
FigNewton.load('data.yml')  
# Non ERB processed
ENV['FIG_NEWTON_FILE']='data.yml'

uninitialized constant FigNewton::Missing::Socket (NameError)

Hi @cheezy,

I am using ruby ver 2.1.3 in windows 8.1 getting the following error. Can u please look into this issue.

Thanks,
Anil

F:\Selenium\RubymineProjects\SeleniumRuby\puppies>cucumber
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows
uninitialized constant FigNewton::Missing::Socket (NameError)
G:/Ruby21/lib/ruby/gems/2.1.0/gems/fig_newton-0.10/lib/fig_newton/missing.rb:20:in `read_file'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/fig_newton-0.10/lib/fig_newton/missing.rb:6:in `method_missing'
F:/Selenium/RubymineProjects/SeleniumRuby/puppies/lib/pages/home_page.rb:4:in `<class:HomePage>'
F:/Selenium/RubymineProjects/SeleniumRuby/puppies/lib/pages/home_page.rb:1:in `<top (required)>'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/require_all-1.3.2/lib/require_all.rb:109:in `require'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/require_all-1.3.2/lib/require_all.rb:109:in `block in require_all'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/require_all-1.3.2/lib/require_all.rb:107:in `each'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/require_all-1.3.2/lib/require_all.rb:107:in `require_all'
F:/Selenium/RubymineProjects/SeleniumRuby/puppies/features/support/env.rb:10:in `<top (required)>'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/rb_support/rb_language.rb:94:in `load'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/rb_support/rb_language.rb:94:in `load_code_file'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime/support_code.rb:172:in `load_file'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime/support_code.rb:85:in `block in load_files!'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime/support_code.rb:84:in `each'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime/support_code.rb:84:in `load_files!'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime.rb:298:in `load_step_definitions'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime.rb:67:in `run!'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/cli/main.rb:38:in `execute!'
G:/Ruby21/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/bin/cucumber:9:in `<top (required)>'
G:/Ruby21/bin/cucumber:23:in `load'
G:/Ruby21/bin/cucumber:23:in `<main>'

Update Readme! FigNewton is more powerful than expressed.

Hey @cheezy

I only JUST realized that FigNewton supports nesting and thus can do .to_hash. This entirely removes my dependency on your other gem DataMagic.

Based on both their current read-me's, they sell as follows:

  1. FigNewton = single line data, basic strings
  2. DataMagic = multi line data, hashes of strings

In reality from looking at the codebase, FigNewton now does so much more.

  1. support for booleans
  2. support for nested elements of type Node which can be turned into hashes
  3. support for integers

I will try take some time to cook up a read-me update so that folks are fully aware of how powerful FigNewton can be.

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.