Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

[TEST] Provide Functionality to Create Examples from Local Source #109

Closed
ghost opened this issue Feb 6, 2018 · 2 comments
Closed

[TEST] Provide Functionality to Create Examples from Local Source #109

ghost opened this issue Feb 6, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2018

GithubExamples.initialize() is directly coupled to raw.githubusercontent.com, the "examples" are downloaded from there.

It should be possible to load the examples from the local file-system (e.g. offline-work, test-sequences etc.).

This should be either implemented directly into ethpm or as a quick workaround for the current problems within #87.

@ghost
Copy link
Author

ghost commented Feb 6, 2018

Workaround

replace the get function within GithubExamples.initialize() to something like this:

  get: function(examples_path,callback) {
    var filename = path.join("./node_modules/ethpm-spec/examples" + examples_path);
    var content  = '';

    fs.readFile(filename, function(err,content) 
    {
      if (err)
        callback(err);
      else
        callback(null, content);
    });
  }

This was referenced Feb 6, 2018
@ghost
Copy link
Author

ghost commented Apr 7, 2018

Closing in favor of housekeeping!!! (@cgewecke )

@ghost ghost closed this as completed Apr 7, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants