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 read_fixture_files | |
| if File.file?(yaml_file_path) | |
| read_yaml_fixture_files | |
| elsif File.file?(csv_file_path) | |
| read_csv_fixture_files | |
| else | |
| raise FixturesFileNotFound, "Could not find #{yaml_file_path} or #{csv_file_path}" | |
| end | |
| 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
| def read_yaml_fixture_files | |
| yaml_string = (Dir["#{@fixture_path}/**/*.yml"].select { |f| | |
| File.file?(f) | |
| } + [yaml_file_path]).map { |file_path| IO.read(file_path) }.join | |
| if yaml = parse_yaml_string(yaml_string) | |
| # If the file is an ordered map, extract its children. | |
| yaml_value = | |
| if yaml.respond_to?(:type_id) && yaml.respond_to?(:value) | |
| yaml.value |
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_self | |
| #= require_tree ./templates | |
| #= require_tree ./models | |
| #= require_tree ./views | |
| #= require_tree ./routers | |
| window.Opjam = | |
| Models: {} | |
| Collections: {} | |
| Routers: {} |
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
| Java Plug-in 1.6.0_26 | |
| Using JRE version 1.6.0_26-b03-383-11A511 Java HotSpot(TM) 64-Bit Server VM | |
| User home directory = /Users/willmarshall | |
| ---------------------------------------------------- | |
| c: clear console window | |
| f: finalize objects on finalization queue | |
| g: garbage collect | |
| h: display this help message | |
| l: dump classloader list | |
| m: print memory usage |
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 Opjam.Models.Track extends Backbone.Model | |
| paramRoot: 'track' | |
| # Set of tracks, scope to a particular broadcast | |
| class Opjam.Collections.TrackCollection extends Backbone.Collection | |
| model: Opjam.Models.Track | |
| url: -> | |
| "/broadcasts/:broadcast_id/tracks" |
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
| resources :broadcasts do | |
| resources :tracks | |
| 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
| window.Opjam = | |
| Models: {} | |
| Collections: {} | |
| Routers: {} | |
| Views: {}, | |
| init: -> | |
| window.Player = new Opjam.Models.Player | |
| window.PlayerView = new Opjam.Views.PlayerView { model: Player } | |
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 Opjam.Models.Wall extends Backbone.Model | |
| paramRoot: 'wall' | |
| defaults: | |
| numColumns: 16 | |
| numRows: 4 | |
| radius: 600 # Radius of the virtual circle | |
| currentRotation: -12 # Initial position, measured in columns | |
| animationDegree: 0.25 # Degrees per frame of animation |
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
| animateRotate: (frames, increment, current) -> | |
| if frames > 0 | |
| current = current + increment | |
| transform = 'translateZ(900px) rotateY(' + current + 'deg)' | |
| for ring in @rings | |
| ring.style.webkitTransform = transform | |
| requestAnimFrame (=> | |
| @animateRotate((frames - 1), increment, current) | |
| ), 0.1 | |
| else |
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 Opjam.Models.Playlist extends Backbone.Model | |
| paramRoot: 'playlist' | |
| defaults: | |
| name: "Untitled playlist" | |
| playlistEntries: new Opjam.Collections.PlaylistEntriesCollection([], url : 'playlists/:id/playlist_entries') |
OlderNewer