Rspec, Pry, Automation Testing

Total Page:16

File Type:pdf, Size:1020Kb

Rspec, Pry, Automation Testing GKTCS Innovations Pvt. Ltd. Ruby, Appium, Android, Rspec, Pry, Automation Testing Surendra Panpaliya Director, GKTCS Innovations Pvt. Ltd, Pune. 16 + Years of Experience ( MCA, PGDCS, BSc. [Electronics] , CCNA) Director , GKTCS Innovations Pvt. Ltd. Pune [ Nov 2009 – Till date ] IT Manager and Consultant at Rolta India Ltd, Mumbai [ April 2007 – Oct 2009 ] Associate Professor at Sinhgad Institute , Pune [Jan 2002 – April 2007] Instructor , ITM Bangalore [ May 2000 – Jan 2002 ] Project Trainee, DSYS Software Group, Bangalore [ Jan 1999 to April 2000] Skills ❑ Ruby, Rail,Appium, Python, Jython, Django, Android , PHP, LAMP ❑ Data Communication & Networking, CCNA ❑ UNIX /Linux Shell Scripting, System Programming ❑ CA Siteminder, Autosys, SSO, Service Desk, Service Delivery Author of 4 Books National Paper Presentation Awards at BARC Mumbai 2 Agenda ( Day 1) • Introduction • Ruby installation • What’s New in Ruby • Ruby Data Types/ Data Structure • Ruby Comparison with Other Language ( Java/C+ + ) • Ruby Demo Script • Appium Introduction • Appium Installation Setup • Discussion 3 Agenda ( Day 2) • Android adb commands • About Android AVD • About Appium Architecture • Appium Features • Using Appium to test Android Emulator/ Physical Device • Writing Ruby Scripts to Automate app through Appium • Discussion 4 Agenda ( Day 3) • Manual Testing to Automation using Ruby • Execute and Automate Test • Rspec Introduction • Rspec Installation • Rspec for Automation • Rspec Demo • Rspec Best Practices • Pry Introduction • Debugging using Pry • Pry Demo • Discussion 5 Rspec What is Rspec? • RSpec is a behavior-driven development (BDD) framework for the Ruby programming language, inspired by JBehave. • It contains its own mocking framework that is fully integrated into the framework based upon JMock. • The framework can be considered a domain-specific language (DSL) and resembles a natural language specification. 6 Rspec RSpec is a Behaviour-Driven Development tool for Ruby programmers. BDD is an approach to software development that combines Test- Driven Development, Domain Driven Design,and Acceptance Test-Driven Planning. RSpec helps you do the TDD part of that equation,focusing on the documentation and design aspects of TDD. 7 Rspec #Testing for our User class describe User do context 'with admin privileges' do before :each do @admin = Admin.get(1) end it 'should exist' do expect(@admin).not_to be_nil end it 'should have a name' do expect(@admin.name).not_to be_false end end #... end 8 Rspec Prerequisites Ruby 1.8.7 or higher (2.0+ recommended) Install $ gem install rspec This installs five gems: rspec rspec-core rspec-expectations rspec-mocks rspec-support The rspec-core gem installs an rspec executable. Run the rspec command with the --help flag to see the available options: 9 rspec —help Surendras-MacBook-Pro:~ SurendraMac$ rspec --help Usage: rspec [options] [files or directories] -I PATH Specify PATH to add to $LOAD_PATH (may be used more than once). -r, --require PATH Require a file. -O, --options PATH Specify the path to a custom options file. --order TYPE[:SEED] Run examples by the specified order type. [defined] examples and groups are run in the order they are defined [rand] randomize the order of groups and examples [random] alias for rand [random:SEED] e.g. --order random:123 --seed SEED Equivalent of --order rand:SEED. --bisect[=verbose] Repeatedly runs the suite in order to isolate the failures to the smallest reproducible case. --[no-]fail-fast Abort the run on first failure. --failure-exit-code CODE Override the exit code used when there are failing specs. --dry-run Print the formatter output of your suite without running any examples or hooks 10 rspec —help Surendras-MacBook-Pro:~ SurendraMac$ rspec --help **** Output **** -f, --format FORMATTER Choose a formatter. [p]rogress (default - dots) [d]ocumentation (group and example names) [h]tml [j]son custom formatter class name -o, --out FILE Write output to a file instead of $stdout. This option applies to the previously specified --format, or the default format if no format is specified. 11 rspec —help --deprecation-out FILE Write deprecation warnings to a file instead of $stderr. -b, --backtrace Enable full backtrace. -c, --[no-]color, --[no-]colour Enable color in the output. -p, --[no-]profile [COUNT] Enable profiling of examples and list the slowest examples (default: 10). -w, --warnings Enable ruby warnings 12 rspec —help **** Filtering/tags **** In addition to the following options for selecting specific files, groups, or examples, you can select individual examples by appending the line number(s) to the filename: rspec path/to/a_spec.rb:37:87 You can also pass example ids enclosed in square brackets: rspec path/to/a_spec.rb[1:5,1:6] # run the 5th and 6th examples/groups defined in the 1st group --only-failures Filter to just the examples that failed the last time they ran. --next-failure Apply `--only-failures` and abort after one failure. (Equivalent to `--only-failures --fail-fast --order defined`) 13 rspec —help -P, --pattern PATTERN Load files matching pattern (default: "spec/**/*_spec.rb"). --exclude-pattern PATTERN Load files except those matching pattern. Opposite effect of --pattern. -e, --example STRING Run examples whose full nested names include STRING (may be used more than once) -t, --tag TAG[:VALUE] Run examples with the specified tag, or exclude examples by adding ~ before the tag. - e.g. ~slow - TAG is always converted to a symbol --default-path PATH Set the default path where RSpec looks for examples (can be a path to a file or a directory). **** Utility **** -v, --version Display the version. -h, --help You're looking at it. 14 rspec - Getting Ready 2. Next, prepare the directory structure: $ mkdir lib 3. Now run RSpec: $ rspec --init 4 To show what we're testing, we'll change the .rspec file generated for us, replacing progress with doc: - -color --format doc 5. We can now run RSpec on our empty specs directory and verify we have the gem installed: $ rspec spec No examples found. Finished in 0.00004 seconds 0 examples, 0 failures 15 rspec - Getting Ready RSpec creates a spec directory, a spec_helper.rb file within that directory, and a .rspec file in the current directory with sensible defaults. If you have a problem locating the .rspec file, it's because the file is hidden. A command-line editor such as Vim has no problem opening a hidden file. for example vim .rspec, but using a common dialog box to select a hidden file can be difficult. In OS X, while the Open dialog box is shown, you can press command + shift + . (period) to temporarily show these hidden files. 16 rspec - Getting Ready RSpec creates a spec directory, a spec_helper.rb file within that directory, and a .rspec file in the current directory with sensible defaults. If you have a problem locating the .rspec file, it's because the file is hidden. A command-line editor such as Vim has no problem opening a hidden file. for example vim .rspec, but using a common dialog box to select a hidden file can be difficult. In OS X, while the Open dialog box is shown, you can press command + shift + . (period) to temporarily show these hidden files. 17 Getting started Begin with a very simple example that expresses some basic desired behaviour. # game_spec.rb RSpec.describe Game do describe "#score" do it "returns 0 for an all gutter game" do game = Game.new 20.times { game.roll(0) } expect(game.score).to eq(0) end end end 18 Getting started Run the example and watch it fail. Surendras-MacBook-Pro:rspect_test SurendraMac$ rspec spec/game_spec.rb /Users/SurendraMac/rspect_test/spec/ game_spec.rb:3:in `<top (required)>': uninitialized constant Game (NameError) from /usr/local/lib/ruby/gems/2.2.0/gems/rspec- core-3.3.2/lib/rspec/core/configuration.rb: 1327:in `load' from /usr/local/lib/ruby/gems/2.2.0/gems/rspec- core-3.3.2/lib/rspec/core/configuration.rb: 1327:in `block in load_spec_files' 19 Getting started Now write just enough code to make it pass. require ‘game' RSpec.describe Game do describe "#score" do it "returns 0 for an all gutter game" do game = Game.new 20.times { game.roll(0) } expect(game.score).to eq(0) end end end 20 Getting started # game.rb class Game def roll(pins) end def score 0 end end Surendras-MacBook-Pro:rspect_test SurendraMac$ rspec spec/game_spec.rb Finished in 0.00108 seconds (files took 0.09666 seconds to load) 1 example, 0 failures 21 Getting started Run the example and bask in the joy that is green. $rspec spec/game_spec.rb --color --format doc Game #score returns 0 for an all gutter game Finished in 0.0008 seconds (files took 0.08722 seconds to load) 1 example, 0 failures Surendras-MacBook-Pro:rspect_test SurendraMac$ 22 rspec-core rspec-core provides the structure for writing executable examples of how your code should behave, and an rspec command with tools to constrain which examples get run and tailor the output. Install gem install rspec # for rspec-core, rspec-expectations, rspec-mocks gem install rspec-core # for rspec-core only rspec --help 23 rspec-core Want to run against the master branch? You'll need to include the dependent RSpec repos as well. Add the following to your Gemfile: %w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib| gem lib, :git => "git://github.com/rspec/#{lib}.git", :branch => 'master' end 24 rspec-core :Basic Structure RSpec uses the words "describe" and "it" so we can express concepts like a conversation: "Describe an order." "It sums the prices of its line items." RSpec.describe Order do it "sums the prices of its line items" do order = Order.new order.add_entry(LineItem.new(:item => Item.new( :price => Money.new(1.11, :USD) ))) ……. 25 rspec-core :Basic Structure .. order.add_entry(LineItem.new(:item => Item.new( :price => Money.new(2.22, :USD), :quantity => 2 ))) expect(order.total).to eq(Money.new(5.55, :USD)) end end 26 rspec-core :Basic Structure .
Recommended publications
  • Rubicon: Bounded Verification of Web Applications
    Rubicon: Bounded Verification of Web Applications The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters. Citation Joseph P. Near and Daniel Jackson. 2012. Rubicon: bounded verification of web applications. In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering (FSE '12). ACM, New York, NY, USA, Article 60, 11 pages. As Published http://dx.doi.org/10.1145/2393596.2393667 Publisher Association for Computing Machinery (ACM) Version Author's final manuscript Citable link http://hdl.handle.net/1721.1/86919 Terms of Use Creative Commons Attribution-Noncommercial-Share Alike Detailed Terms http://creativecommons.org/licenses/by-nc-sa/4.0/ Rubicon: Bounded Verification of Web Applications Joseph P. Near, Daniel Jackson Computer Science and Artificial Intelligence Lab Massachusetts Institute of Technology Cambridge, MA, USA {jnear,dnj}@csail.mit.edu ABSTRACT ification language is an extension of the Ruby-based RSpec We present Rubicon, an application of lightweight formal domain-specific language for testing [7]; Rubicon adds the methods to web programming. Rubicon provides an embed- quantifiers of first-order logic, allowing programmers to re- ded domain-specific language for writing formal specifica- place RSpec tests over a set of mock objects with general tions of web applications and performs automatic bounded specifications over all objects. This compatibility with the checking that those specifications hold. Rubicon's language existing RSpec language makes it easy for programmers al- is based on the RSpec testing framework, and is designed to ready familiar with testing to write specifications, and to be both powerful and familiar to programmers experienced convert existing RSpec tests into specifications.
    [Show full text]
  • Rubicon: Bounded Verification of Web Applications
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by DSpace@MIT Rubicon: Bounded Verification of Web Applications Joseph P. Near, Daniel Jackson Computer Science and Artificial Intelligence Lab Massachusetts Institute of Technology Cambridge, MA, USA {jnear,dnj}@csail.mit.edu ABSTRACT ification language is an extension of the Ruby-based RSpec We present Rubicon, an application of lightweight formal domain-specific language for testing [7]; Rubicon adds the methods to web programming. Rubicon provides an embed- quantifiers of first-order logic, allowing programmers to re- ded domain-specific language for writing formal specifica- place RSpec tests over a set of mock objects with general tions of web applications and performs automatic bounded specifications over all objects. This compatibility with the checking that those specifications hold. Rubicon's language existing RSpec language makes it easy for programmers al- is based on the RSpec testing framework, and is designed to ready familiar with testing to write specifications, and to be both powerful and familiar to programmers experienced convert existing RSpec tests into specifications. in testing. Rubicon's analysis leverages the standard Ruby interpreter to perform symbolic execution, generating veri- Rubicon's automated analysis comprises two parts: first, fication conditions that Rubicon discharges using the Alloy Rubicon generates verification conditions based on specifica- Analyzer. We have tested Rubicon's scalability on five real- tions; second, Rubicon invokes a constraint solver to check world applications, and found a previously unknown secu- those conditions. The Rubicon library modifies the envi- rity bug in Fat Free CRM, a popular customer relationship ronment so that executing a specification performs symbolic management system.
    [Show full text]
  • Automating Configuration N49(PDF)
    Automating Network Configuration Brent Chapman Netomata, Inc. [email protected] www.netomata.com NANOG 49 — 13 June 2010 Copyright © 2010, Netomata, Inc. All Rights Reserved. Introduction Who I am What I'm here to talk about 2 Copyright © 2010, Netomata, Inc. All Rights Reserved. Why automate network configuration? Because automated networks are More reliable Easier to maintain Easier to scale 3 Copyright © 2010, Netomata, Inc. All Rights Reserved. For example... Imagine you're managing a moderately complex web site Multiple real and virtual hosts Several "environments" (production, testing, development, etc.) Separate VLAN for each environment 4 Copyright © 2010, Netomata, Inc. All Rights Reserved. For example... What networking devices & services need to be managed? Routers Switches Load Balancers Firewalls Real-time status monitoring (i.e., Nagios) Long-term usage monitoring (i.e., MRTG) 5 Copyright © 2010, Netomata, Inc. All Rights Reserved. For example... How to add new virtual host to existing load balancer pool? Set up host itself, using Puppet or cfengine or whatever Add host to VLAN defs on switches Add host to ACLs on routers Add host to pool on load balancers Add host to NAT and ACLs on firewalls Add host to real-time monitoring (i.e., Nagios) Add host to usage monitoring (i.e., MRTG) 6 Copyright © 2010, Netomata, Inc. All Rights Reserved. For example... What's the problem with doing all that by hand? You have to remember how to manage all those very different devices (and you probably don't do it very often) It takes a lot of time Every step is a chance to make a mistake You might get distracted, and never finish Over time, these small mistakes add up, leading to inconsistent networks that are unreliable and difficult to troubleshoot 7 Copyright © 2010, Netomata, Inc.
    [Show full text]
  • Third-Party Software for Engage Products APPLICATIONS Red Hat
    Third-Party Software for Engage Products APPLICATIONS Red Hat Enterprise Linux General Information Source Code Status Not modified by Vocera URL https://www.redhat.com/en/about/licenses-us Supplemental END USER LICENSE AGREEMENT (November 2010) License Text RED HAT® ENTERPRISE LINUX® AND RED HAT APPLICATIONS PLEASE READ THIS END USER LICENSE AGREEMENT CAREFULLY BEFORE USING SOFTWARE FROM RED HAT. BY USING RED HAT SOFTWARE, YOU SIGNIFY YOUR ASSENT TO AND ACCEPTANCE OF THIS END USER LICENSE AGREEMENT AND ACKNOWLEDGE YOU HAVE READ AND UNDERSTAND THE TERMS. AN INDIVIDUAL ACTING ON BEHALF OF AN ENTITY REPRESENTS THAT HE OR SHE HAS THE AUTHORITY TO ENTER INTO THIS END USER LICENSE AGREEMENT ON BEHALF OF THAT ENTITY. IF YOU DO NOT ACCEPT THE TERMS OF THIS AGREEMENT, THEN YOU MUST NOT USE THE RED HAT SOFTWARE. THIS END USER LICENSE AGREEMENT DOES NOT PROVIDE ANY RIGHTS TO RED HAT SERVICES SUCH AS SOFTWARE MAINTENANCE, UPGRADES OR SUPPORT. PLEASE REVIEW YOUR SERVICE OR SUBSCRIPTION AGREEMENT(S) THAT YOU MAY HAVE WITH RED HAT OR OTHER AUTHORIZED RED HAT SERVICE PROVIDERS REGARDING SERVICES AND ASSOCIATED PAYMENTS. This end user license agreement (“EULA”) governs the use of any of the versions of Red Hat Enterprise Linux, certain other Red Hat software applications that include or refer to this license, and any related updates, source code, appearance, structure and organization (the “Programs”), regardless of the delivery mechanism. 1. License Grant. Subject to the following terms, Red Hat, Inc. (“Red Hat”) grants to you a perpetual, worldwide license to the Programs (most of which include multiple software components) pursuant to the GNU General Public License v.2.
    [Show full text]
  • Reglas De Congo: Palo Monte Mayombe) a Book by Lydia Cabrera an English Translation from the Spanish
    THE KONGO RULE: THE PALO MONTE MAYOMBE WISDOM SOCIETY (REGLAS DE CONGO: PALO MONTE MAYOMBE) A BOOK BY LYDIA CABRERA AN ENGLISH TRANSLATION FROM THE SPANISH Donato Fhunsu A dissertation submitted to the faculty of the University of North Carolina at Chapel Hill in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of English and Comparative Literature (Comparative Literature). Chapel Hill 2016 Approved by: Inger S. B. Brodey Todd Ramón Ochoa Marsha S. Collins Tanya L. Shields Madeline G. Levine © 2016 Donato Fhunsu ALL RIGHTS RESERVED ii ABSTRACT Donato Fhunsu: The Kongo Rule: The Palo Monte Mayombe Wisdom Society (Reglas de Congo: Palo Monte Mayombe) A Book by Lydia Cabrera An English Translation from the Spanish (Under the direction of Inger S. B. Brodey and Todd Ramón Ochoa) This dissertation is a critical analysis and annotated translation, from Spanish into English, of the book Reglas de Congo: Palo Monte Mayombe, by the Cuban anthropologist, artist, and writer Lydia Cabrera (1899-1991). Cabrera’s text is a hybrid ethnographic book of religion, slave narratives (oral history), and folklore (songs, poetry) that she devoted to a group of Afro-Cubans known as “los Congos de Cuba,” descendants of the Africans who were brought to the Caribbean island of Cuba during the trans-Atlantic Ocean African slave trade from the former Kongo Kingdom, which occupied the present-day southwestern part of Congo-Kinshasa, Congo-Brazzaville, Cabinda, and northern Angola. The Kongo Kingdom had formal contact with Christianity through the Kingdom of Portugal as early as the 1490s.
    [Show full text]
  • Puppet Offers a Free, Reliable and Cross Flavor Option for Remote Enterprise Computer Management
    This material is based on work supported by the National Science Foundation under Grant No. 0802551 Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author (s) and do not necessarily reflect the views of the National Science Foundation C4L8S1 System administrators are constantly challenged when managing large enterprise systems using Linux-based operating systems. Administrators need to know a variety of command line differentiations, dependency variations, and support options to support the various computers systems in use. Puppet offers a free, reliable and cross flavor option for remote enterprise computer management. This lesson will introduce you to the Puppet AdministrativeU the tool and provide you with a basic overview on how to use Puppet. Lab activities will provide you with hands-on experience with the Puppet application and assignments and discussion activities will increase your learning on this subject. Understanding Puppet is important because of its ability to manage enterprise systems. Students hoping to become Linux Administrators must gain mastery of enterprise management tools like Puppet to improve efficiency and productivity. C4L8S2 You should know what will be expected of you when you complete this lesson. These expectations are presented as objectives. Objectives are short statements of expectations that tell you what you must be able to do, perform, learn, or adjust after reviewing the lesson. Lesson Objective: U the Given five computers that need to be configured,
    [Show full text]
  • Rubyperf.Pdf
    Ruby Performance. Tips, Tricks & Hacks Who am I? • Ezra Zygmuntowicz (zig-mun-tuv-itch) • Rubyist for 4 years • Engine Yard Founder and Architect • Blog: http://brainspl.at Ruby is Slow Ruby is Slow?!? Well, yes and no. The Ruby Performance Dichotomy Framework Code VS Application Code Benchmarking: The only way to really know performance characteristics Profiling: Measure don’t guess. ruby-prof What is all this good for in real life? Merb Merb Like most useful code it started as a hack, Merb == Mongrel + Erb • No cgi.rb !! • Clean room implementation of ActionPack • Thread Safe with configurable Mutex Locks • Rails compatible REST routing • No Magic( well less anyway ;) • Did I mention no cgi.rb? • Fast! On average 2-4 times faster than rails Design Goals • Small core framework for the VC in MVC • ORM agnostic, use ActiveRecord, Sequel, DataMapper or roll your own db access. • Prefer simple code over magic code • Keep the stack traces short( I’m looking at you alias_method_chain) • Thread safe, reentrant code Merb Hello World No code is faster then no code • Simplicity and clarity trumps magic every time. • When in doubt leave it out. • Core framework to stay small and simple and easy to extend without gross hacks • Prefer plugins for non core functionality • Plugins can be gems Key Differences • No auto-render. The return value of your controller actions is what gets returned to client • Merb’s render method just returns a string, allowing for multiple renders and more flexibility • PartController’s allow for encapsualted applets without big performance cost Why not work on Rails instead of making a new framework? • Originally I was trying to optimize Rails and make it more thread safe.
    [Show full text]
  • Ruby, Appium, Android, Rspec, Pry, Automation Testing
    GKTCS Innovations Pvt. Ltd. Ruby, Appium, Android, Rspec, Pry, Automation Testing Surendra Panpaliya Director, GKTCS Innovations Pvt. Ltd, Pune. 16 + Years of Experience ( MCA, PGDCS, BSc. [Electronics] , CCNA) Director , GKTCS Innovations Pvt. Ltd. Pune [ Nov 2009 – Till date ] IT Manager and Consultant at Rolta India Ltd, Mumbai [ April 2007 – Oct 2009 ] Associate Professor at Sinhgad Institute , Pune [Jan 2002 – April 2007] Instructor , ITM Bangalore [ May 2000 – Jan 2002 ] Project Trainee, DSYS Software Group, Bangalore [ Jan 1999 to April 2000] Skills ❑ Ruby, Rail,Appium, Python, Jython, Django, Android , PHP, LAMP ❑ Data Communication & Networking, CCNA ❑ UNIX /Linux Shell Scripting, System Programming ❑ CA Siteminder, Autosys, SSO, Service Desk, Service Delivery Author of 4 Books National Paper Presentation Awards at BARC Mumbai 2 Agenda ( Day 1) • Introduction • Ruby installation • What’s New in Ruby • Ruby Data Types/ Data Structure • Ruby Comparison with Other Language ( Java/C+ + ) • Ruby Demo Script • Appium Introduction • Appium Installation Setup • Discussion 3 Agenda ( Day 2) • Android adb commands • About Android AVD • About Appium Architecture • Appium Features • Using Appium to test Android Emulator/ Physical Device • Writing Ruby Scripts to Automate app through Appium • Discussion 4 Agenda ( Day 3) • Manual Testing to Automation using Ruby • Execute and Automate Test • Rspec Introduction • Rspec Installation • Rspec for Automation • Rspec Demo • Pry Introduction • Debugging using Pry • Pry Demo • Discussion 5 Introduction • What is Ruby? • What is difference between Scripting language and Programming Language? • What’s New in Ruby? • Ruby Installation • irb • Ruby Script execution. 6 Appium Introduction What is Appium? • Appium is a mobile UI testing framework supporting cross-platform testing of native, hybrid and mobile-web apps for iOS and Android.
    [Show full text]
  • Theine2 Documentation Release Latest
    theine2 Documentation Release latest Dec 06, 2019 Contents 1 Installing 3 2 Upgrading 5 3 Using 7 4 Configuration 9 4.1 base_port and max_port.........................................9 4.2 min_free_workers............................................9 4.3 spawn_parallel..............................................9 4.4 silent................................................... 10 5 Speed up Theine 11 5.1 Tell Theine to use CRuby for the client................................. 11 6 Using with Foreman 13 7 Using with Docker 15 8 How it works 17 i ii theine2 Documentation, Release latest Theine is a Rails application pre-loader designed to work on JRuby. It is similar to Zeus, Spring and Spork. The problem with Zeus and Spring is that they use fork which doesn’t work on JRuby. An example: time rails runner"puts Rails.env" 48.31s user 1.96s system 242% cpu 20.748 total # normal time theine runner"puts Rails.env" 0.12s user 0.02s system 32% cpu 0.449 total # Theine Contents 1 theine2 Documentation, Release latest 2 Contents CHAPTER 1 Installing You need to install screen on your system. For example on Ubuntu: sudo apt-get install screen Then install the gem. gem install theine2 3 theine2 Documentation, Release latest 4 Chapter 1. Installing CHAPTER 2 Upgrading If you want to use CRuby for the client, you will probably need to re-run theine_set_ruby after upgrading. 5 theine2 Documentation, Release latest 6 Chapter 2. Upgrading CHAPTER 3 Using Start up the theine server in the root of your Rails project: theine_server or theine_start for a detached
    [Show full text]
  • Ola Bini Computational Metalinguist [email protected] 698E 2885 C1DE 74E3 2CD5 03AD 295C 7469 84AF 7F0C
    JRuby For The Win Ola Bini computational metalinguist [email protected] http://olabini.com/blog 698E 2885 C1DE 74E3 2CD5 03AD 295C 7469 84AF 7F0C onsdag 12 juni 13 Logistics and Demographics onsdag 12 juni 13 LAST MINUTE DEMO onsdag 12 juni 13 JRuby Implementation of the Ruby language Java 1.6+ 1.8.7 and 1.9.3 compatible (experimental 2.0 support) Open Source Created 2001 Embraces testing Current version: 1.7.4 Support from EngineYard, RedHat & ThoughtWorks onsdag 12 juni 13 Why JRuby? Threading Unicode Performance Memory Explicit extension API and OO internals Libraries and legacy systems Politics onsdag 12 juni 13 InvokeDynamic onsdag 12 juni 13 JRuby Differences Most compatible alternative implementation Native threads vs Green threads No C extensions (well, some) No continuations No fork ObjectSpace disabled by default onsdag 12 juni 13 Simple JRuby onsdag 12 juni 13 Java integration Java types == Ruby types Call methods, construct instances Static generation of classes camelCase or snake_case .getFoo(), setFoo(v) becomes .foo and .foo = v Interfaces can be implemented Classes can be inherited from Implicit closure conversion Extra added features to Rubyfy Java onsdag 12 juni 13 Ant+Rake onsdag 12 juni 13 Clojure STM onsdag 12 juni 13 Web onsdag 12 juni 13 Rails onsdag 12 juni 13 Sinatra onsdag 12 juni 13 Trinidad onsdag 12 juni 13 Swing Swing API == large and complex Ruby magic simplifies most of the tricky bits Java is a very verbose language Ruby makes Swing fun (more fun at least) No consistent cross-platform GUI library for Ruby
    [Show full text]
  • An Introduction to Computer Science with Java, Python and C++ Community College of Philadelphia Edition
    An Introduction to Computer Science with Java, Python and C++ Community College of Philadelphia edition Copyright 2017 by C.W. Herbert, all rights reserved. Last edited August 28, 2017 by C. W. Herbert This document is a draft of a chapter from An Introduction to Computer Science with Java, Python and C++, written by Charles Herbert. It is available free of charge for students in Computer Science courses at Community College of Philadelphia during the Fall 2017 semester. It may not be reproduced or distributed for any other purposes without proper prior permission. Please report any typos, other errors, or suggestions for improving the text to [email protected] 01010000 01111001 01110100 01101000 01101111 01101110 01001010 01100001 01110110 01100001 01000011 00101011 00101011 Chapter 1 – Introduction Contents About the Course .......................................................................................................................................... 2 Course Materials and Instructors.................................................................................................................. 3 Chapter 1 – Introduction ............................................................................................................................... 5 Learning Outcomes ....................................................................................................................................... 5 Computing and Computer Science ................................................................................... 6 The Computer
    [Show full text]
  • Download the 2021 IEEE Thesaurus
    2021 IEEE Thesaurus Version 1.0 Created by The Institute of Electrical and Electronics Engineers (IEEE) 2021 IEEE Thesaurus The IEEE Thesaurus is a controlled The IEEE Thesaurus also provides a vocabulary of almost 10,900 descriptive conceptual map through the use of engineering, technical and scientific terms, semantic relationships such as broader as well as IEEE-specific society terms terms (BT), narrower terms (NT), 'used for' [referred to as “descriptors” or “preferred relationships (USE/UF), and related terms terms”] .* Each descriptor included in the (RT). These semantic relationships identify thesaurus represents a single concept or theoretical connections between terms. unit of thought. The descriptors are Italic text denotes Non-preferred terms. considered the preferred terms for use in Bold text is used for preferred headings. describing IEEE content. The scope of descriptors is based on the material presented in IEEE journals, conference Abbreviations used in the Thesaurus: papers, standards, and/or IEEE organizational material. A controlled BT - Broader term vocabulary is a specific terminology used in NT - Narrower term a consistent and controlled fashion that RT - Related term results in better information searching and USE- Use preferred term retrieval. UF - Used for Thesaurus construction is based on the ANSI/NISO Z39.19-2005(2010) standard, Guidelines for the Construction, Format, and Management of Monolingual Controlled Vocabulary. The Thesaurus vocabulary uses American-based spellings with cross references to British variant spellings. The scope and structure of the IEEE Thesaurus reflects the engineering and scientific disciplines that comprise the Societies, Councils, and Communities of the IEEE in *Refer to ANSI/NISO NISO Z39.19-2005 addition to the technologies IEEE serves.
    [Show full text]