This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it 'provides a rails generator when installed in a sample Rails app' do | |
| result = system "cd #{app_rails_copy} | |
| rails generate ultra_light_wizard:scaffold project steps:basic_info,detail,file_upload,preview attributes:name:string,description:text,start_date:datetime,delivery_date:datetime | |
| rake db:migrate | |
| rake" | |
| expect(result).to be_truthy | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_relative '../rails_helper' | |
| RSpec.feature "Ultra Light Wizard", type: :feature do | |
| scenario 'can start wizard' do | |
| create_project | |
| verify_step(Project::BasicInfo) | |
| end | |
| scenario 'can input all 4 fields and go to step 2 in wizard' do | |
| create_project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ rake | |
| /Users/User/.rvm/rubies/ruby-2.4.1/bin/ruby -I/Users/User/.rvm/gems/ruby-2.4.1@ultra_light_wizard/gems/rspec-core-3.6.0/lib:/Users/User/.rvm/gems/ruby-2.4.1@ultra_light_wizard/gems/rspec-support-3.6.0/lib /Users/User/.rvm/gems/ruby-2.4.1@ultra_light_wizard/gems/rspec-core-3.6.0/exe/rspec spec/lib/ultra_light_wizard/ultra_light_wizard_spec.rb | |
| [Coveralls] Set up the SimpleCov formatter. | |
| [Coveralls] Using SimpleCov's default settings. | |
| generate scaffold | |
| invoke active_record | |
| create db/migrate/20170729234504_create_projects.rb | |
| create app/models/project.rb | |
| invoke test_unit | |
| create test/models/project_test.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HelloComputed | |
| extend Glimmer | |
| include_package 'org.eclipse.swt' | |
| include_package 'org.eclipse.swt.widgets' | |
| include_package 'org.eclipse.swt.layout' | |
| contact = Contact.new( | |
| first_name: "Barry", | |
| last_name: "McKibbin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example (nesting): | |
| require 'nested_inherited_jruby_include_package' | |
| class OuterClass | |
| include_package java.util | |
| class InnerClass | |
| def initialize | |
| p Arrays.asList(1, 2, 3) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You may clone glimmer repo, follow setup instructions, and run bin/girb then copy/paste code below | |
| class RedLabel | |
| include Glimmer::UI::CustomWidget | |
| before_body { | |
| @color = color(:red) | |
| } | |
| after_body { | |
| body_root.on_mouse_up { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ... | |
| def display_video_status(video, status) | |
| message_box = MessageBox.new(video.swt_widget.getShell) | |
| message_box.setText(status) | |
| message = "Video Position: #{video.position} seconds\n" | |
| message += "Video Duration: #{video.duration} seconds" | |
| message_box.setMessage(message) | |
| message_box.open | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shell(:no_resize, app_name: 'Glimmer Demo', app_version: '1.0') { | |
| text "Glimmer" | |
| label { | |
| text "Hello, World!" | |
| } | |
| }.open |