Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Recipe controller/model CRUD testing #41

Merged
merged 8 commits into from
Jun 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions .byebug_history
Original file line number Diff line number Diff line change
@@ -1,3 +1,129 @@
exit
result
result.first
next
opts
self
user
next
env[ENV_SESSION_OPTIONS]
next
user
step
status
step
next
name
step
sql
name
step
name
step
Thread.current.status
next
name
step
attr_name
step
attributes[name]
step
value
step
attr
step
other
step
value
step
name
step
self
value
step
env["rack.errors"].inspect
env["rack.errors"].debug
env["rack.errors"].name
env["rack.errors"]
env
step
set_host(v)
v
@host
step
@user
step
value
step
k
step
value
step
str
step
value
step
params
step
@@schemes
step
path
parameters
step
@value
step
attributes
step
@value
@valu
step
@recipe
exit
step
ivar
step
@path_helper_modules
step
exception
step
exception
step
exception
step
app
step
@integration_session
step
@integration_session
step
@recipe
exit
eixt
step
eval recipes
eval recipe
exit
step
exps
e.call
e
before
step
exps
step
exps
e
step
expression
step
@user
Recipe.count
exit
response.body
response
exit
@recipe
recipe
q!
eval raise(exception)
eval e
Expand Down
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ gem 'raphael-rails'

group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
# gem 'spring'
end

group :development, :test do
gem 'sqlite3'
gem 'pry'
gem 'byebug'
gem 'guard'
gem 'guard-minitest'

end

group :production do
Expand Down
35 changes: 31 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ GEM
execjs (2.7.0)
faraday (0.11.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
figaro (1.1.1)
thor (~> 0.14)
fission (0.5.0)
Expand Down Expand Up @@ -228,6 +229,19 @@ GEM
formatador (0.2.5)
globalid (0.3.7)
activesupport (>= 4.1.0)
guard (2.14.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
hashie (3.5.5)
i18n (0.8.1)
inflecto (0.0.2)
Expand All @@ -243,8 +257,13 @@ GEM
railties (>= 3.2.16)
json (1.8.6)
jwt (1.5.6)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
lumberjack (1.0.12)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mailboxer (0.14.0)
Expand All @@ -262,9 +281,13 @@ GEM
multi_json (1.12.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nenv (0.3.0)
net-ssh (3.2.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
oauth (0.5.1)
oauth2 (1.3.1)
faraday (>= 0.8, < 0.12)
Expand Down Expand Up @@ -330,6 +353,9 @@ GEM
ranked-model (0.4.0)
activerecord (>= 3.1.12)
raphael-rails (2.1.2)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rbvmomi (1.11.0)
builder (~> 3.0)
json (>= 1.8)
Expand All @@ -338,6 +364,7 @@ GEM
rdoc (4.3.0)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
ruby_dep (1.5.0)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
Expand All @@ -352,15 +379,14 @@ GEM
activemodel (>= 4.1)
elasticsearch (>= 1)
hashie
shellany (0.0.1)
simple_form (3.4.0)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
slop (3.6.0)
social-share-button (0.1.10)
coffee-rails
sass-rails
spring (2.0.1)
activesupport (>= 4.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand Down Expand Up @@ -413,6 +439,8 @@ DEPENDENCIES
figaro
fog (~> 1.38.0)
font-awesome-sass (~> 4.6.2)
guard
guard-minitest
jbuilder (~> 2.0)
jquery-rails
jquery-ui-rails (~> 5.0, >= 5.0.5)
Expand All @@ -435,7 +463,6 @@ DEPENDENCIES
searchkick
simple_form
social-share-button
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
Expand All @@ -447,4 +474,4 @@ RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.13.6
1.14.4
44 changes: 44 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}

## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"


guard :minitest do
# with Minitest::Unit
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb$}) { 'test' }

# with Minitest::Spec
# watch(%r{^spec/(.*)_spec\.rb$})
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r{^spec/spec_helper\.rb$}) { 'spec' }

# Rails 4
watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch(%r{^test/test_helper\.rb$}) { 'test' }
watch(%r{^test/controllers/*.rb})

# Rails < 4
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
end
36 changes: 0 additions & 36 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,46 +1,10 @@
# Readme

- Mirv's trouble shooting steps
- To Do Listing
- Beta Listing

---

Javascript trouble shooting stuff ...

- First we need to decide if it's a loading issue - Open the web browser console & check `elements` for your js file names
... saw the cocoon was loaded under the "elements" section
- Opened the /layouts/application.html.erb file & ensured there was only one javascript_include_tag.
- Also that the javascript_include_tag was in the <head> tag & that the head tag is properly closed with </head>
- Look for other non-essential or extra service loading files
... Sumo was generating 4 errors in the chrome console, so I commented that out
- Checked the /app/assets/javascript folder for the application.js file, also that there's no .coffee files (rails autos them)
... for some reason, you have `app/assets/javascript/exercise.coffee` showing up in the directory
- Check inside the application.js file ...
- Check order of your /app/assets/javascript/application.js files being loaded
... yours is wrong ... the `//= require_tree .`
... absolutely must be at the bottom or you're going to have issues including all the files.
- Additionally, you had two files which did not have the required, `//= ` in front of them. It's required to load them
- Ensure no extra scripts being loaded in the views, I use `grep -r 'script' /app` & check any spot that shows up
... I'm finding scripts in your view files instead of the assets files for javascript ...
If the asset asset is loading, we know it's either a conflict or poorly written code
- Insert a piece of test code in the console so when the $.document or the turbolinks finished loading to see if it's poor code
... they will report to console a string ("Page -- Loaded") in my case,
- If it doesn't load, it's a conflict with other java files, if it loads, it's just your code needs to be fixed
- I pull all the entries from the application.js except a test.js file (look up how to capture to log js to console)
- At this point it should work if everything before it passed ... if not you might have corrupt files
... you should go into application.html.erb & use javascript_include_tag to include a CDN version of Jquery (google it)
- Assuming the test.js works ...
... first, in your `app/assets/javascript/application.js`, at the bottom of the file up the `//= .` & save it ...
... now, you should re-add your js files to the app/assets/javascript one at a time, testing each time by refreshing the ...
... webpage, possibly restarting the server after copying the file in & doing a rake or rails assets like shown below
... `rails assets:clean` & the `rails assets:precompile`



---


to do first:

- add images parralax image to aws
Expand Down
Loading