graph-function 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/examples/comparing_ints.rb +1 -1
- data/lib/graph/function.rb +2 -2
- data/lib/graph/function/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 421167ce11bda065293d3e2d411366c005f6dac8
         | 
| 4 | 
            +
              data.tar.gz: 611fa94c29782e68e69a9c40e643caa7ab4fb9be
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ee22e9f5c505376d33b136582a4afd7ab3a5f0d8a2902a80e18372fcf8f82623f8a11648b8642dad3b0cdaceaa1c1ee2c5160e16394c03a1946ae5f275dd3eb1
         | 
| 7 | 
            +
              data.tar.gz: daa1821d691bc300454e8e683f0f2667f2392938db475ac2a6b6057383e98870a8d572b58010c6267fab0da94b2780993cab1f59a610601cd8c7929375bde4a4
         | 
    
        data/README.md
    CHANGED
    
    | @@ -54,6 +54,16 @@ Or install it yourself as: | |
| 54 54 |  | 
| 55 55 | 
             
            ## Usage
         | 
| 56 56 |  | 
| 57 | 
            +
            ### TL;DR
         | 
| 58 | 
            +
             | 
| 59 | 
            +
            From the [comparing ints example](examples/comparing_ints.rb):
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            ```ruby
         | 
| 62 | 
            +
            require 'graph/function'
         | 
| 63 | 
            +
            Graph::Function.as_gif
         | 
| 64 | 
            +
            Graph::Function::IntsComparison.of(method(:sort), method(:bubble_sort))
         | 
| 65 | 
            +
            ```
         | 
| 66 | 
            +
             | 
| 57 67 | 
             
            ### Setup
         | 
| 58 68 |  | 
| 59 69 | 
             
            To set up, you only need the following:
         | 
    
        data/examples/comparing_ints.rb
    CHANGED
    
    
    
        data/lib/graph/function.rb
    CHANGED
    
    | @@ -25,14 +25,14 @@ module Graph | |
| 25 25 |  | 
| 26 26 | 
             
                singleton_class.send(:alias_method, :as_x11, :configure)
         | 
| 27 27 |  | 
| 28 | 
            -
                def self.as_gif(file)
         | 
| 28 | 
            +
                def self.as_gif(file = File.expand_path("../#{$0.slice(0..-4)}.gif", __FILE__))
         | 
| 29 29 | 
             
                  self.configure do |config|
         | 
| 30 30 | 
             
                    config.terminal = 'gif'
         | 
| 31 31 | 
             
                    config.output = file
         | 
| 32 32 | 
             
                  end
         | 
| 33 33 | 
             
                end
         | 
| 34 34 |  | 
| 35 | 
            -
                def self.as_canvas(file)
         | 
| 35 | 
            +
                def self.as_canvas(file = File.expand_path("../#{$0.slice(0..-4)}.html", __FILE__))
         | 
| 36 36 | 
             
                  self.configure do |config|
         | 
| 37 37 | 
             
                    config.terminal = 'canvas'
         | 
| 38 38 | 
             
                    config.output = file
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: graph-function
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Alex Moore-Niemi
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016- | 
| 11 | 
            +
            date: 2016-10-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: gnuplot
         |